I have come across this problem in a book that I was reading. I have found some interesting solutions and proofs by myself that I am sharing.
We have to prove that every prime number can be expressed as $a^2-b^2$, where a and b are positive integers.
Let, p be a prime number. I will prove that p can be expressed as $a^2-b^2$ and also show that we can represent p in that way for a certain relationship between a and b.
At first notice that:
$p = a^2-b^2 = (a+b)(a-b)$
So, we have found two factors of a number, p, which is prime. Now, p only has 1 and p as factors, therefore, either $(a+b) = p$ and $(a-b) = 1$, or $(a-b) = p$ and $(a+b) = 1$.
But, as a and b are positive integers, $(a+b) > (a-b)$. As all primes are greater than 1, $[(a+b) = p] > [(a-b) = 1]$.
So, we get:
$a-b = 1$
$\implies a = b+1$
So, a and b are two consecutive positive integers! Now, we know that:
$a+b = p$
$\implies b+(b+1) = p$.
Therefore, if we can prove that every prime number can be expressed as the sum of two consecutive positive integers, we will also prove that every prime number can be expressed as the difference of two squares.
Now, we only have to deal with odd primes (all primes except 2). We know that every odd number can be expressed as 2k+1, where k is a positive integer.
$2k+1 = k+(k+1)$.
Hence, every odd number can be expressed as the sum of two consecutive positive integers.
So, we have also proved that every odd prime number can be expressed as the sum of two consecutive positive integers.
Therefore, we have proved that every prime number can be expressed as $a^2-b^2$, where a and b are positive integers (and also consecutive positive integers).
Q.E.D
Another way of proving this in a much simpler and algebraic way (which is easy to do once you know the fact that a and b in the above proof are consecutive positive integers) is this:
Suppose we have a positive integer n. The positive integer after it is n+1.
$(n+1)^2 - n^2 = n^2 + 2n + 1 - n^2 = 2n+1$ [which is an odd number]
Now, the positive integer just after n+1 is n+2.
$(n+2)^2 - (n+1)^2 = n^2 + 4n + 4 - n^2 - 2n - 1 = 4n - 2n - 4 - 1 = 2n+3$ [which is also an odd number]
So, the difference of squares of n and $n+1$, and $n+1$ and $n+2$ gives us $2n+1$ and $2n+3$ respectively, which are two consecutive odd numbers. So, the difference of squares of two consecutive positive integers covers ALL the odd numbers. As all primes are odd, they can also be represented in that way.
N.B:
Note that, in the beginning, we have noticed that:
$a^2-b^2 = (a+b)(a-b)$
So, for any number, if it can be written as a difference of squares, it can also be written as $(a+b)(a-b)$
Now, here, $a+b$ and $a-b$ are two factors of the number. So, for primes, we have found them to be consecutive using earlier logic. BUT, for any other even or odd, non-prime numbers, this representation WILL NOT be unique, as they will have more than 2 factors.
Answering your questions in order:
- Prove that every odd prime number can be written as a difference of two squares: All numbers can be, due to the $(a+b)(a-b)$ representation.
- Prove also that this presentation is unique: THE REPRESENTATION IS UNIQUE ONLY FOR PRIME NUMBERS. As the prime numbers have to be expressed as the difference of squares of two CONSECUTIVE integers, the representation is unique for each prime number.
- Is such presentation possible if p is just an odd natural number?: Yes [Shown in both the proofs]
- Can 2 be represented this way?: No, as 2 is not an odd number.
$ $
However, for uniqueness, one needs $n$ to be a prime. For example, $25 = 7^2 + 24^2 = 15^2 + 20^2$
– Gamma Function May 27 '14 at 07:12