CalmoSoft primes: Difference between revisions

Content added Content deleted
(Added Algol 68)
Line 47: Line 47:
OD;
OD;
IF this prime AND this len > max len THEN
IF this prime AND this len > max len THEN
# found a longer sequence #
max len := this len; # found a longer sequence #
max len := this len;
max start := this start;
max start := this start;
max end := this end;
max end := this end;
Line 54: Line 53:
FI
FI
FI;
FI;
# reduce the sequence sum by the start prime #
# the start prime won't be in the next sequence #
seq sum -:= prime[ this start ]
seq sum -:= prime[ this start ]
OD;
OD;