# Thread: Prime squared -1 problem

1. ## Prime squared -1 problem

If I square a prime number ( >3) and subtract 1 , it turns out it is a multiple of 24 and there are different ways of proving this.
Why doesn't my approach below work?

All prime number are of the form 6n+1 or 6n-1 ( greater than 3).
So (6n+1)^2 -1 or (6n-1)^2 -1 only proves that they are multiples of 12 not 24?

What am I missing?

2. ## Re: Prime squared -1 problem

$(6n+1)^2 -1 = 36n^2+12n = 12(3n^2+n)$

if n is odd ...

$12[3(2k+1)^2 + (2k+1)]=12(12k^2+14k+4)=24(6k^2+7k+2)$

if n is even ...

$12[3(2k)^2+(2k)]=12(12k^2+2k)=24(6k^2+k)$

you can show the same for the other prime form ...

3. ## Re: Prime squared -1 problem

(6n+1)^2- 1= 36n^2+ 12n= 12n(3n+ 1).

Obviously that has a factor of 12 but what about n(3n+ 1)? If n is even then there is another factor of 2 so 2*12= 24 is a factor. If n is odd, then 3n is also odd so 3n+ 1 is even and, again, there is another factor of 2. 24 is always a factor.

4. ## Re: Prime squared -1 problem

Of course. Thank you both!