Ruth-Aaron numbers: Difference between revisions

m
(Added Algol 68)
Line 36:
Uses sieves for the prime factor sums and prime divisor sums, assumes that the first Ruth-Aaron triples are under 99 000 000.<br>
This uses a large amount of memory - too much for Algol 68G under Windows (and possibly under Linux).<br>
With max number set to 1 000 000, Algol 68G can find the first triple using factors in a few seconds (the loop to find the first divisors triple must be commented out or removed) - Real time: 0.941 s on TIO.RUN.
<lang algol68>BEGIN # find Ruth-Aaron pairs - pairs of consecutive integers where the sum #
# of the prime factors or divisors are equal #
3,021

edits