This page is sponsored by
https://www.A-Wee-Bit-of-Ireland.com/^{™}

A sieve was used to generate a list of prime numbers. In order to reduce storage requirements, the information about prime or not prime was stored for 30 integers in each byte.

In each 30 integers, for N >= 1, the numbers that might be prime are

N*30+1,

N*30+7,

N*30+11,

N*30+13,

N*30+17,

N*30+19,

N*30+23,

N*30+29

This means that information about prime or not prime only needs to
occupy 8 bits. A ten byte file would hold prime or not prime for 300
integers.

Enter a positive integer in the form below to find out whether it is
a prime number.

John Moyer's home page

Copyright © 1999, John Moyer, All rights reserved.