Proper divisors: Difference between revisions
Content added Content deleted
m (→Faster Proper Divisor Counting: Added note on running under Algol 68G) |
m (→Faster Proper Divisor Counting: typo) |
||
Line 412: | Line 412: | ||
===Faster Proper Divisor Counting=== |
===Faster Proper Divisor Counting=== |
||
Alternative version that uses a sieve-like approach for faster proper divisor counting. |
Alternative version that uses a sieve-like approach for faster proper divisor counting. |
||
<br><br>Note, in order to run this with Algol 68G under Windows (and possibly |
<br><br>Note, in order to run this with Algol 68G under Windows (and possibly Linux) the heap size must be increased, see [[ALGOL_68_Genie#Using_a_Large_Heap]]. |
||
<lang algol68>BEGIN # count proper divisors using a sieve-like approach # |
<lang algol68>BEGIN # count proper divisors using a sieve-like approach # |
||
# find the first/only number in 1 : 20 000 and 1 : 64 000 000 with # |
# find the first/only number in 1 : 20 000 and 1 : 64 000 000 with # |