Using prime numbers, you can amaze your friends with a prime prediction…

1. Ask your friends to pick any prime number greater than 3.

2. Square it.

3. Add 14.

4. Divide by 12.

Without knowing which prime number your friends picked, you can still tell them:

** There will be a remainder of 3.**

But HOW does it work?

Let’s do an example:

13 is a prime number, squaring it gives 169, adding 14 gives 183 which has a remainder of 3 upon division by 12.

This works for every prime number greater than 3, but how exactly does it work?

The mathematics behind this is rather simple.

1. Let p be a prime number, p > 3.

2. Squaring gives:

p^2.

3. Adding 14 gives:

p^2 + 14

4. Taking it modulo 12 gives:

(p^2 + 14) mod 12

We want to show that:

(p^2 + 14) mod 12 = 3

This is equivalent to:

p^2 – 1 is divisible by 12.

That is:

(p-1)(p+1) is divisible by 12.

For a number to be divisible by twelve, it has to be divisible both by 3 and by 4. We know that, out of p-1, p and p+1, one of them must be

divisible by 3; and it can’t be p, because p is prime and **greater **than 3. Thus, either p-1 or p+1 is divisible by 3, and so their product is also:

(p-1)(p+1) is divisible by 3.

Now, since p is a prime greater than 3, we know that it is odd. Therefore, both p-1 and p+1 are even numbers. The product of two even numbers is divisible by 4, so:

(p-1)(p+1) is divisible by 4.

Combining this with the above, we get that:

(p-1)(p+1) is divisible by 12.

And hence:

(p^2 + 14) mod 12 = 3