2016 Update

This commit is contained in:
Tina Müller 2016-12-05 22:15:40 +01:00
parent 948b86eafa
commit dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions

View file

@ -1,5 +1,15 @@
proper_divisors =: [: */&> [: }: [: , [: { [: <@:({. ^ i.@:>:@:{:)";: [: |: 2 p: x:
aliquot =: ([: +/ proper_divisors) ::0:
rc_aliquot_sequence =: aliquot^:(i.16)&>
rc_classify =: [: {. ([;.1' invalid terminate non-terminating perfect amicable sociable aspiring cyclic') #~ (16 ~: #) , (6 > {:) , (([: +./ (2^47x)&<) +. (16 = #@:~.)) , (1 = #@:~.) , ((8&= , 1&<)@:{.@:(#/.~)) , ([: =/ _2&{.) , 1:
rc_display_aliquot_sequence =: (":,~' ',~rc_classify)@:rc_aliquot_sequence
proper_divisors=: [: */@>@}:@,@{ [: (^ i.@>:)&.>/ 2 p: x:
aliquot=: +/@proper_divisors ::0:
rc_aliquot_sequence=: aliquot^:(i.16)&>
rc_classify=: 3 :0
if. 16 ~:# y do. ' invalid '
elseif. 6 > {: y do. ' terminate '
elseif. (+./y>2^47) +. 16 = #~.y do. ' non-terminating'
elseif. 1=#~. y do. ' perfect '
elseif. 8= st=. {.#/.~ y do. ' amicable '
elseif. 1 < st do. ' sociable '
elseif. =/_2{. y do. ' aspiring '
elseif. 1 do. ' cyclic '
end.
)
rc_display_aliquot_sequence=: (rc_classify,' ',":)@:rc_aliquot_sequence

View file

@ -11,17 +11,17 @@
terminate 10 8 7 1 0 0 0 0 0 0 0 0 0 0 0 0
rc_display_aliquot_sequence&>11, 12, 28, 496, 220, 1184, 12496, 1264460, 790, 909, 562, 1064, 1488, 15355717786080x
terminate 11 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
terminate 12 16 15 9 4 3 1 0 0 0 0 0 0 0 0 0 ...
perfect 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 ...
perfect 496 496 496 496 496 496 496 496 496 496 496 496 496 496 496 496 ...
amicable 220 284 220 284 220 284 220 284 220 284 220 284 220 284 220 284 ...
amicable 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 ...
sociable 12496 14288 15472 14536 14264 12496 14288 15472 14536 14264 12496 14288 15472 14536 14264 12496 ...
sociable 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184 ...
aspiring 790 650 652 496 496 496 496 496 496 496 496 496 496 496 496 496 ...
aspiring 909 417 143 25 6 6 6 6 6 6 6 6 6 6 6 6 ...
cyclic 562 284 220 284 220 284 220 284 220 284 220 284 220 284 220 284 ...
cyclic 1064 1336 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 ...
non-terminating 1488 2480 3472 4464 8432 9424 10416 21328 22320 55056 95728 96720 236592 459792 881392 882384 ...
non-terminating 15355717786080 44534663601120 144940087464480 471714103310688 1130798979186912 2688948041357088 6050151708497568 13613157922639968 35513546724070632 74727605255142168 162658586225561832 353930992506879768 642678347124409032 112510261154846...
terminate 11 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
terminate 12 16 15 9 4 3 1 0 0 0 0 0 0 0 0 0
perfect 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28
perfect 496 496 496 496 496 496 496 496 496 496 496 496 496 496 496 496
amicable 220 284 220 284 220 284 220 284 220 284 220 284 220 284 220 284
amicable 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210
sociable 12496 14288 15472 14536 14264 12496 14288 15472 14536 14264 12496 14288 15472 14536 14264 12496
sociable 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184 1264460 1547860 1727636 1305184
aspiring 790 650 652 496 496 496 496 496 496 496 496 496 496 496 496 496
aspiring 909 417 143 25 6 6 6 6 6 6 6 6 6 6 6 6
cyclic 562 284 220 284 220 284 220 284 220 284 220 284 220 284 220 284
cyclic 1064 1336 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210 1184 1210
non-terminating 1488 2480 3472 4464 8432 9424 10416 21328 22320 55056 95728 96720 236592 459792 881392 882384
non-terminating 15355717786080 44534663601120 144940087464480 471714103310688 1130798979186912 2688948041357088 6050151708497568 13613157922639968 35513546724070632 74727605255142168 162658586225561832 353930992506879768 642678347124409032 1125102611548462968 1977286128289819992 3415126495450394808