This is a homework question, so I'm looking for some help to get started with the problem since I cannot think of a good way to do so. I know that we can say the integers a and b can be written as $a = p_1p_2...p_k$ and $b = q_1q_2...q_k$ where $p_i$ and $q_i$ are prime numbers. After this I'm stuck and don't know how to continue. Any help is appreciated, thank you.
-
4Hint: Factor $a^2-b^2$. Side note: $1$ is not a prime anyway, you probably mean "every prime except $2$" – player3236 Nov 05 '20 at 17:38
-
1This is a question about differences of squares. Think about the first natural squares, 1, 4, 9, 16, 25... What's their difference? Can you think about why? – AnilCh Nov 05 '20 at 17:41
-
@DottorMaelstrom NO... if $a-b=1$ – Tito Eliatron Nov 05 '20 at 17:44
-
1@player3236 probably he meant "except one prime" – Lios Nov 05 '20 at 17:47
3 Answers
Hint: Try showing that every odd number can be written as the difference of two squares. Handle the prime number 2 separately.

- 1,971
Note that $a^{2}-b^{2} = (a + b)(a - b)$. Note that every odd number, and thus every odd prime, can be written this way by taking $a-b = 1$. Thus, every prime except $2$ can be written in the form $a^{2}-b^{2}$. $\blacksquare$

- 6,103
Every odd number $2n+1$ can be written as the sum of two consecutive numbers: $n,n+1$. The difference between two consecutive numbers is simply $1$. We see that $((n+1)+n)\cdot ((n+1)-n)=(n+1)^2-n^2=2n+1$, so every odd number, to include every odd prime number, can be readily represented as the difference of two squares. Can you finish by showing why the only even prime, $2$, cannot be so represented?

- 7,288
-
Thank you! 2 cannot be represented this way because we would say (a+b)=2 and (a-b) =1, since 2 is prime. Then solving for a with these equations would result in a= 3/2, which does not follow the integer difference of squares format. – vinbera Nov 06 '20 at 16:06