Answer to Puzzle #15: Prime Squared Minus 1 Multiple of 24

15. Why is it that if 'p' is a prime number bigger than 3, then p2-1 is always divisible by 24 with no remainder?

This one took me a while, my first answer, although valid, was not the best. The final answer is quite tidy although there is some algebra required...

Before reading the answer can I interest you in a clue?

The solution relies on showing that p2 - 1 is a multiple of 2x2x2x3

First expand p2 - 1 to give:

p2 - 1 = (p - 1) x (p + 1)

Then consider the terms on the right hand side, firstly since we know that p must be odd, so p - 1 and p + 1 must be even. We have two of the factors we require.

Additionally since p - 1 and p + 1 effectively form 2 consecutive even numbers one of them must be a multiple of 4, thus we have another of our factors of 2. So far we have 2x2x2, now to get the factor of 3

p - 1, p & p + 1 form three consecutive numbers. In any three consecutive numbers one will be a multiple of 3, we know it is not p which is a multiple of 3, as this is prime, hence either p - 1 or p + 1 is a multiple. Therefore p2 - 1 has the factors 2, 2, 2 & 3 hence:

p2 - 1 = 24n

(Why must p be greater than 3? Well 3 is the only number which is both a multiple of 3 and prime)

© Nigel Coldwell 2004 -  – The questions on this site may be reproduced without further permission, I do not claim copyright over them. The answers are mine and may not be reproduced without my expressed prior consent. Please enquire using the link at the top of the page.

I always think it's arrogant to add a donate button, but it has been requested. If I help you get a job though, you could buy me a pint! - nigel

This Website Uses Cookies

Mostly, but not entirely to remember if you have dismissed this very box. Also to increase the functionality of the site. The cookies I apply do not uniquely identify you, by continuing to use this site you agree to let me place a cookie. I also have advert and analytics providers, for more information click here here.x