- or download this
R(0) = 0;
for n > 0,
R(n) = R(n-1) - n if positive and not already in the sequence, oth
+erwise
R(n) = R(n-1) + n.
- or download this
use strict;
use warnings;
...
last;
}
}
- or download this
14:20 >perl recaman.pl
1 <-- 1
...
4 <-- 131
19 <-- 99734
...
- or download this
use strict;
use warnings;
...
int_handler();
exit 0;
}
- or download this
14:20 >perl -v
This is perl 5, version 22, subversion 0 (v5.22.0) built for MSWin32-x
+64-multi-thread