Find prime numbers of the form n*n*n+2: Difference between revisions

Content added Content deleted
(Frink)
m (Ada: Fix Is_Prime)
Line 20: Line 20:
if A mod 3 = 0 then return False; end if;
if A mod 3 = 0 then return False; end if;
D := 5;
D := 5;
while D * D < A loop
while D * D <= A loop
if A mod D = 0 then
if A mod D = 0 then
return False;
return False;