I don't know, can you find a formula? but your thing looks pretty fast! Have you looked at Rosetta Code this looks like a classic task for them.
Welcome to the forum!
Yes RC has it: https://rosettacode.org/wiki/Anti-primes#FreeBASIC
FreeBasic is usually a good one to compare with.
Welcome to the forum!
Yes RC has it: https://rosettacode.org/wiki/Anti-primes#FreeBASIC
FreeBasic is usually a good one to compare with.
b = b + ...