Amicable pairs: Difference between revisions

Content deleted Content added
→‎{{header|ALGOL 68}}: Simplify and particularly use a better method to calculate the proper divisor sum table
Rdm (talk | contribs)
m →‎{{header|J}}: cleaner implementation
Line 2,759: Line 2,759:
Amicable pairs:
Amicable pairs:


<syntaxhighlight lang="j"> 1 + 0 20000 #: I. ,(</~@i.@# * (* |:))(=/ +/@properDivisors@>) 1 + i.20000
<syntaxhighlight lang="j"> 1 + ($ #: I.@,) (</~@i.@# * (* |:))(=/ +/@properDivisors@>) 1 + i.20000
220 284
220 284
1184 1210
1184 1210