Anti-primes: Difference between revisions
Content deleted Content added
m →even and odd numbers: simplified the code. |
|||
Line 1,314:
#= # + 1; maxD= d /*found an anti─prime #; set new minD.*/
say center(#, 7) right(j, 10) /*display the index and the anti─prime.*/
if #>=N then leave
end /*j*/
end /*once*/
Line 1,321:
#divs: procedure; parse arg x 1 y /*X and Y: both set from 1st argument.*/
if x<3 then return x /*handle special cases for one and two.*/
if x==4 then return 3 /* " " "
if x<6 then return 2 /* " " "
odd= x // 2 /*check if X is odd or not. */
if odd then
else do; #= 3; y= x%2; end /*Even? " " " " 3.*/
/* [↑] start with known num of Pdivs.*/
|