- Oct 1, 2007If z is an odd integer between 2 and 16,

and 1 + 2 z1 + 4 z2 + 8 z3 is its base two representation,

then z is prime if and only if

z3 * [ z2 + (1 - z1) * (1 - 2 z2 ) ] = 0.

A similar, but of course, more complicated formula may be constructed

for z's of any prescribed number of bits.

Kermit < kermit@... >