If the number is present in sieve then
not prime, else it is.
The sieve is
Let represents the term in the above sieve. So along the x-axis we have
and along y-axis we have
. The common difference along x-axis is
. The common difference along y-axis is
. The first number is 4. So if we first go down we have
. At the same time the common difference across the x axis starting from this point will be
. Thus along horizontal axis the term (a,b) will be
.
Now
Thus we see that if the number happens to be in the sieve then happens to be a non-prime.
Next we must show that if the number is not in the sieve, then
is a prime. Or by contrapositive if
is not prime then
is in the sieve. Suppose
, where
. Since
is odd this means both
are odd. Let
and
. Therefore
. This means that
appears as the
entry in the sieve. Note it could also be
entry in the sieve.