Prime Puzzle
Solution


Solution to Question 1: We start with p that is 5 or larger, compute p2-1, and are surprised that the answer is divisible by 24. Is this a coincidence, or is it explainable?

The first thing to note is that the result can be rewritten:


        p2-1 = ( p - 1 ) * ( p + 1 )
      
Thus, when we start with 5, we end up looking at 4 * 6. When we start with 7, we end up with 6 * 8.

Notice that the numbers we multiply are both even. That's no accident. Except for 2, every prime number p is odd, so p-1 and p+1 must be even, and their product p2-1 is divisible by 4.

Now notice that p-1 and p+1 are consecutive even numbers. That means that one of them must actually be divisible by 4, and that means that p2-1 must actually be divisible by 8.

Now finally, note that for any three consecutive numbers, it must be true that one of them is divisible by 3. So, of the numbers p-1, p, and p+1, one of them must be divisible by 3. Can it be the number p? No, because p is a prime number, and it's 5 or greater, so it can't be the number 3, and it can't have a divisor of 3. Therefore, one of p-1 and p+1 must be divisible by 3, and that means that p2-1 must actually be divisible by 24.


Solution to Question 2: There are a number of ways of approaching this problem. However, a good approach is to worry about the factor of 2 in the definition of S(m).

If S(m)+1 is a perfect square, with root s, then S(m) is the difference of two squares and hence can be factored:


        S(m) = ( S(m) + 1 ) - 1
             = s * s - 1 * 1
             = ( s + 1 ) * ( s - 1 )
      
But we also know:
S(m) = P1P2P3...Pm

Therefore, S(m) has exactly one factor of 2. But if S(m) can be written as the product (s + 1 ) ( s - 1 ), then these two factors are either both even or both odd, and hence S(m) would either be odd or divisible by 4, neither of which is true.

Therefore, S(m)+1 can never be a perfect square.


Back to the Prime Puzzle.


Last revised on 19 June 2005.