Idoneal numbers: Difference between revisions

(Added a link to the O'Halloran numbers task)
Line 27:
# where 0 < a < b < c #
# there are 65 known idoneal numbers #
INT count := 0;
FORINT n WHILEmax count <= 65 DO;
FOR n WHILE count < max count DO
BOOL idoneal := TRUE;
FOR a TO n - 2 WHILE count < 65max count AND idoneal DO
FOR b FROM a + 1 TO n - 1
WHILE INT ab = a * b;
ab < n AND count < 65max count AND idoneal
DO
FOR c FROM b + 1 TO n
Line 39 ⟶ 40:
INT sum = ab + bc + ac;
sum <= n
AND count < 65max count
AND ( idoneal := sum /= n )
DO SKIP OD
3,028

edits