Multiplicatively perfect numbers: Difference between revisions
m
→{{header|ALGOL 68}}: fix comment
(Added Algol 68) |
m (→{{header|ALGOL 68}}: fix comment) |
||
Line 37:
FOR j FROM i + i BY i TO UPB pdc DO
pdc[ j ] +:= 1;
IF prime[ m +:= 1 ] THEN # j is a prime multiple of
pfc[ j ] +:= 1;
IF i = m THEN # j is i squared #
Line 53:
FOR n TO UPB pdc DO
IF n = 1 OR pdc[ n ] = 3 THEN
# n is 1 or has 3 proper divisors so is
# number - see OEIS A007422 #
mp count +:= 1;
|