I would suggest looking at the Math One Liners. ]]>

` ``min(remainder(Ans,seq(A,A,2,1+√(Ans`

This checks if Ans is prime. Returns 1 if prime, 0 if composite. ]]>

` ``:Input N :not(max(not(fPart(N/augment({2},1+2cumSum(binomcdf(int(.5√N))-1,0`

Try it out for yourself! Any optimizations you got? I suspect there might be a way to make the **not(max(not** part at the beginning more efficient but I couldn't figure anything out.