Jump to content

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 n not is relatively prime to its divisor sum #
ds[ n ] := 0
FI
3,038

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.