A Math Puzzle
Recently I read an interesting math puzzle in Medium:
There is a prime number \(p\) greater than 3.
What factors can we find in \(p^2-1\) ?
First, we can rewrite \(p^2-1\) as \((p+1)(p-1)\).
- Since \(p\) is a prime number greater than 3, \(p\) must be a odd number, both \((p+1)\) and \((p-1)\) are even, have a factor of 2.
- And they are consective even numbers, one of them must have a factor of 4.
- Because \(p\) is prime and greater than 3, when divided by 3, it has a remainder of either 1 or 2. This means one of \((p+1)\) or \((p-1)\) must be a multiple of 3.
Now, multiplying these factors together: \(2 * 4 * 3=24\)
You can verify with some prime numbers:
- \(5^2-1=24 = 24 * 1 \)
- \(7^2-1=48 = 24 * 2 \)
- \(11^2-1=120 = 24 * 5 \)
Elegant, right?
