this is an old exam question dealing with some trivial number theory. I'm not sure if this question should go in the "Number Theory" section. I don't feel this is "university level" material though. Please forgive me if this is the wrong section.
Give a proof that any odd prime number can be written as the difference between two squares. E.g. 5 = 3^2 - 2^2
Attempt at proof:
Let p be a prime number > 2.
We wish to show that p = a^2 - b^2, where a and b are integers.
p = a^2 - b^2 = (a + b)(a - b)
I know that p should only have the factors p and 1. Therefore I can reduce the expression to be p = a + b?
From simply a Google search I see that I should also be able to conclude that a - b = 1. How do I reach that conclusion?
Therefore, we have that a = (p + 1)/2 and b = (p - 1)/2
p = (p + 1)/2 - (p - 1)/2 = a^2 - b^2
In addition to the questions above in the attempt it is not clear to me that this is a proof. Could someone explain it to me?
Thanks for any help.