Duffinian numbers: Difference between revisions
m
→{{header|ALGOL 68}}: notes and comments
(Added Algol 68) |
m (→{{header|ALGOL 68}}: notes and comments) |
||
Line 37:
=={{header|ALGOL 68}}==
Constructs a table of divisor counts without doing any divisions.
<lang algol68>BEGIN # find Duffinian numbers: non-primes relatively prime to their divisor count #
INT max number := 500 000; # largest number we will consider #
Line 62 ⟶ 63:
OR gcd( n, nds ) /= 1
THEN
# n is prime or is
ds[ n ] := 0
FI
|