RosettaCodeData/Task/Aliquot-sequence-classifications/EchoLisp/aliquot-sequence-classifications-2.echolisp
2016-12-05 23:44:36 +01:00

39 lines
1.4 KiB
Text

(lib 'math)
(lib 'bigint)
(for-each taxonomy (range 1 13))
1 terminating 1 0 0 ...
2 terminating 2 1 0 0 ...
3 terminating 3 1 0 0 ...
4 terminating 4 3 1 0 0 ...
5 terminating 5 1 0 0 ...
6 perfect 6 6 6 ...
7 terminating 7 1 0 0 ...
8 terminating 8 7 1 0 0 ...
9 terminating 9 4 3 1 0 0 ...
10 terminating 10 8 7 1 0 0 ...
11 terminating 11 1 0 0 ...
12 terminating 12 16 15 9 4 3 1 0 0 ...
(for-each taxonomy '( 28 496 220 1184 12496 1264460 790 909 562 1064 1488 15355717786080))
28 perfect 28 28 28 ...
496 perfect 496 496 496 ...
220 amicable 220 284 220 284 220 ...
1184 amicable 1184 1210 1184 1210 1184 ...
12496 sociable 12496 14288 15472 14536 14264 12496 14288 15472 ...
1264460 sociable 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184 1264460 ...
790 aspiring 790 650 652 496 496 ...
909 aspiring 909 417 143 25 6 6 ...
562 cyclic 562 284 220 284 ...
1064 cyclic 1064 1336 1184 1210 1184 ...
1488 non-terminating 1488 2480 3472 4464 8432 9424 10416 21328 ...
15355717786080 non-terminating 15355717786080 44534663601120 144940087464480 471714103310688 1130798979186912 2688948041357088 6050151708497568 13613157922639968 ...
(taxonomy 1000) ;; 1000 non-terminating after 16 steps
1000 non-terminating 1000 1340 1516 1144 1376 1396 1054 674 ...
(taxonomy 1000 32) ;; but terminating if we increase the number of steps
1000 terminating
1000 1340 1516 1144 1376 1396 1054 674 340 416 466 236 184 176 196 203 37 1 0 0 ...