10
  1. Prove that every odd prime number can be written as a difference of two squares.
  2. Prove also that this presentation is unique.
  3. Is such presentation possible if p is just an odd natural number?
  4. Can 2 be represented this way?

Answers

\3. Yes the presentation (i.e. odd numbers being written as differences of two squares) is possible for all odd natural number however the presentation may not be unique. For example, $57=11^2-8^2=29^2-28^2$.

\4. 2 can't be written as a difference of two squares because 4-1=3 and 1-1=0 and the difference of squares grows to integers larger that 3.

Can I get some help in proving questions 1 and 2?

  • Something to help you better visualize the problem. – Lucian May 27 '14 at 03:54
  • 4
    Do remark that for every odd integer $2n+1$, we have $$2n+1 = (n+1)^2 - n^2$$ Thus not only can every odd prime be represented as the difference of two squares, but every odd integer can be written as the difference of two squares.

    $ $

    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
  • 1
    @GammaFunction You meant $625 = 7^2 + 24^2 = 15^2 + 20^2$. – user26486 May 27 '14 at 14:03

4 Answers4

15

$1$. Let $(x+y)(x-y) = p$

Since $p$ is prime, the smaller divisor has to be one, ie. $(x-y) = 1$, giving $2y+1 = p \implies y = \frac{p-1}{2}$ (you're guaranteed y is an integer because $p$ is an odd number).

So the only possible solution set is $x = \frac{p+1}{2}, y = \frac{p-1}{2}$

$2$. Uniqueness already established via reasoning above.

$3$. Possible, but it will be non-unique as $(x-y)$ can take on multiple values, e.g. $1$ or a single prime divisor of $p$ or a product of some (but not all) prime divisors of $p$.

$4$. No, because again $(x-y)$ = 1 is forced. But now you get $x = \frac{3}{2}$ which is non-integral. So no integer solution sets exist.

Deepak
  • 26,801
  • 1
    Note that for $4$, if $n=(x+y)(x-y)$ the two factors differ by $2y$ and hence have the same parity. If one is even, the other is even, so if $2|n$ then $4|n$ - so $2, 6, 10, 14 \dots$ cannot be the difference of two squares. – Mark Bennet May 27 '14 at 09:38
  • 1
    Giving a +1 for the answer to part 4, because it is interesting that all the math works for even numbers as well, except that instead of integer solutions, you get $\frac{1}{2}$ solutions. – Joel Rondeau May 27 '14 at 14:10
  • 1
    @MarkBennet You could generalize it. A number can be expressed as the difference of two squares if it belongs to the set $$S = {x \in \mathbb{Z} | x \equiv 0, 1, 3\pmod 4}$$ – TheRandomGuy Apr 08 '16 at 15:31
13

Hint. If $p$ is prime and $p\ne2$, can you solve $$p=(x+y)(x-y)\ ?$$ Is there more than one solution?

David
  • 82,662
0

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:

  1. 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.
  2. 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.
  3. Is such presentation possible if p is just an odd natural number?: Yes [Shown in both the proofs]
  4. Can 2 be represented this way?: No, as 2 is not an odd number.
Faiyaz
  • 1
-3

I found some thing very useful, the product of any two odd numbers can always be expressed as the difference of squares of two integers.

Let a,b belongs to Z+ , are two odd numbers,

Now a+b is always even, and [a+b]/2 certainly generates an integer and also [a-b]/2 generates another integer.

Now {[a+b]^2/4} -{[a-b]^2/4} = ab

Now consider the case of any odd prime number

Any prime number can be written as P X 1 since it cant be decomposed further.

So {[p+1]^2/4}-{[p-1]^2/4} = p

Any odd prime number can be expressed as the difference of squares of two integers. Of course its unique !!! as the numbers [P+1]/2 and [P-1]/2 are unique for a given prime number. .