unsigned char * MakePrime32bit( void )
{
const MAX3=0x55555555;
unsigned char * tbl = malloc(0x20010000/3);
unsigned int n=5,m=1,n1,n2, x;
memset(tbl,0,0x20010000/3);

while (/*n<0x10000*/ m < 21845){
if(!TestBits(tbl, m) ){
/* n == 3 * m + 2 */
x = m*(3*m+4)+1;
n2 = 6*m+4;
n1 = 2*m+1;
printf("%5d\n", 3*m+2);
while( x<MAX3){SetBit(tbl, x);SetBit(tbl, x+n1); x += n2;}
} m++;
if(!TestBits(tbl, m) ){
/* n == 3 * m + 1 */
x = m*(3*m+2);
n2 = 6*m+2;
n1 = 4*m+1;
printf("%5d\n", 3*m+1);
while( x<MAX3){SetBit(tbl,x);SetBit(tbl,x+n1);x+=n2;}
} m++;
}

return tbl;
}