Associated Topics || Dr. Math Home || Search Dr. Math

Difference of Square Numbers

Date: 07/18/2008 at 22:55:54
From: Nathaniel
Subject: Are the differences of two squares ever the same as another?

Is the differences between a^2 minus b^2 ever the same as the
difference between c^2 minus d^2?  In other words, can one number be
represented as two distinct differences of squares?

Heuristically I tend to believe that the answer is no, that the
differences of squares are always unique.  However, mathematically, I
am not sure.

I know that every square is the sum of a certain number of odd
numbers.  1+3+5....= a square number.  Hence, I would have to
determine whether a+(a+2)+(a+4) is unique when taking the difference
of square numbers.

Date: 07/18/2008 at 23:04:55
From: Doctor Tom
Subject: Re: Are the differences of two squares ever the same as another?

Yes, some numbers can be represented by two distinct differences of
square numbers.  There are lots of examples.  The first one I found was:

57 = 11^2 - 8^2 or 29^2 - 28^2

- Doctor Tom, The Math Forum
http://mathforum.org/dr.math/

Date: 07/19/2008 at 12:37:36
From: Doctor Garramone
Subject: Re: Are the differences of two squares ever the same as another?

Hi Nathaniel,

Adding a little more to Dr. Tom's example, here are some general thoughts.

Only prime numbers and integers not of the form 4k + 2 can be
represented by the difference of two squares.  In the case of the
primes, the difference of squares is unique.

In the case of other integers, there can be alternate ways to come
up with the same difference.  For example,

24 = 12*2
= [(12 + 2)/2]^2 - [(12 - 2)/2]^2
= 7^2 - 5^2
= 49 - 25
= 24

24 = 6*4
= [(6 + 4)/2]^2 - [(6 - 4))/2]^2
= 5^2 - 1^2
= 25 - 1
= 24

for the top line let a = 7 and b = 5   [a^2 = 49, b^2 = 25]

for the next line let c = 5 and d = 1  [c^2 = 25, d^2 = 1]

(Reference:  Burton, David M. 2007. Elementary Number Theory, 6th
Edition.  Boston: McGraw Hill: 269-270.)

Does this help?

- Doctor Garramone, The Math Forum
http://mathforum.org/dr.math/

Date: 07/20/2008 at 13:28:31
From: Nathaniel
Subject: Are the differences of two squares ever the same as another?

Thank you to both Math Doctors who helped!  Could you send the proof
that prime numbers have a unique difference of squares?

Thanks ever much!

Date: 07/21/2008 at 09:50:21
From: Doctor Garramone
Subject: Re: Are the differences of two squares ever the same as another?

Hi Nathaniel,

A proof is in that same book I referred to:  Burton DM. 2007.
Elementary Number Theory, 6th Ed.  Boston: McGraw Hill Higher
Education; 270.

The proof is as follows:

Let p be a given prime number.  Suppose that

p = a^2 - b^2 = (a + b)(a - b)

where a > b > 0.  Because 1 and p are the only factors of p,
necessarily we have

a - b = 1    and    a + b = p

from which it may be inferred that

p + 1               p - 1
a = -----    and    b = -----
2                   2

Thus, any odd prime p can be written as the difference of the squares
of two integers in precisely one way; namely as

/p + 1\ 2       /p - 1\ 2
p = |-----|    -    |-----|
\  2  /         \  2  /

Please write back if you have questions on the proof or any further
questions on this topic.

- Doctor Garramone, The Math Forum
http://mathforum.org/dr.math/
Associated Topics:
College Number Theory
High School Number Theory

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search