TIL: For any prime number p >= 5, p²-1 is divisible by 24.

That's cool.

Isn't it?

Yes it is.

Informal proof that for a prime p >=5, p²-1 must be a multiple of 24.

p²-1 = (p-1)(p+1)

p-1, p, p+1 are three consecutive integers. One of them must be divisible by 3 - and it can't be p, because p is prime. So either p-1 or p+1 is a multiple of 3.

Also, p is odd, so p-1 and p+1 are both even - and one or the other must be divisible by 4. One is a multiple of 2, the other of 4.

So the product of p-1 and p+1 has factors of 2, 3 and 4, and must be a multiple of 2*3*4 =24.

@shayman A prime ≥ 5 must be of the form 6n±1. (6n±1)²-1 = 36n²±12n = 12n(3n±1) which is obviously a multiple of 24 if n is even, but if n is odd 3n±1 is even, so it is a multiple of 24 again. So it's really a property of numbers 6n±1 rather than just primes.
@dearlove You're right. Slightly lessens the coolness of my original note.