Home > Maths

Here is my adaptation of a proof by Joel Karnofsky. Graham McRae reproduces this proof here.

Graeme McRae also presents a proof M1. I present this proof, modified slightly by me, here.

Theorem (Fermat): No four squares are in arithmetic progression with positive common difference.

Proof (Joel Karnofsky, further elucidated by me): Assume A2, B2, C2 and D2 form a strictly increasing arithmetic progression of squares so that B2 + C2 is minimal over all such progressions. We will get a contradiction by constructing another such progression with smaller middle sum.

We can assume A, B, C, D ≥ 0 and, by minimality, have no common factor; hence none has a common factor with the successive difference; hence no successive pair has a common factor.

As proved in the first proof, A, B, C and D are all odd.

Let

t = (A+C)/2

u = (C-A)/2

Then

A = t-u

⇒ A2 = t2-2tu+u2

C = t+u

⇒ C2 = t2+2tu+u2

⇒ B2 = (A2+C2)/2 = t2+u2

so (t, u, B) is a primitive Pythagorean triple. Thus there exist relatively prime e > f > 0 with

B = e2 + f2 ___ [1]

and t and u are 2ef and e2 - f2 in some order. Hence

A = |e2 - 2ef - f2|

C = e2 + 2ef - f2.

Similarly, we can find relatively prime g > h > 0 with

B = |g2 - 2gh - h2|

C = g2 + h2 ___ [2]

D = g2 + 2gh - h2.

The equation for B implies that there are two cases:

1) B = g2 - 2gh - h2

2) B = h2 + 2gh - g2

Consider Case 1: B = g2 - 2gh - h2. Thus

B = e2 + f2 = g2 - 2gh - h2

C = e2 + 2ef - f2 = g2 + h2

Taking the sum and difference gives

e2 + ef = g2 - gh

ef - f2 = gh + h2

Multiplying the first equation by f2 + h2 and the second by ef + gh,

adding the results and rearranging two ways gives

(f2 + h2)(e2 + ef) + (ef + gh)(ef - f2) = (f2 + h2)(g2 - gh) + (ef + gh)(gh + h2)

⇒ e2f2 + ef³ + e2h2 + efh2 + e2f2 - ef³ + efgh - f2gh = f2g2 - f2gh + g2h2 - gh³ + efgh + efh2 + g2h2 + gh³

⇒ e2f2 + e2h2 + efh2 + e2f2 + efgh - f2gh = f2g2 - f2gh + g2h2 + efgh + efh2 + g2h2

⇒ e2f2 + e2h2 + e2f2 = f2g2 + g2h2 + g2h2

⇒ e2(2f2 + h2) = g2(f2 + 2h2) ___ [3]

⇒ f2(2e2 - g2) = h2(2g2 - e2) ___ [4]

Let

a = h/hcf(f, h)

b = e/hcf(e, g)

c = g/hcf(e, g)

d = f/hcf(f, h)

Then, from [3] and [4], by definition of a, b, c, d,

b2(2d2 + a2) = c2(d2 + 2a2) ___ [5]

d2(2b2 - c2) = a2(2c2 - b2) ___ [6]

Consider Case 2: B = h2 + 2gh - g2. As before, equating the two representations for B and C and taking the sum and difference of the results gives

e2 + ef = h2 + gh

ef - f2 = g2 - gh.

Multiplying the first equation by ef + gh and the second by h2 - e2, adding the results and rearranging two ways gives

(ef + gh)(e2 + ef) + (h2 - e2)(ef - f2) = (ef + gh)(h2 + gh) + (h2 - e2)(g2 - gh)

⇒ e³f + e2f2 + e2gh + efgh + efh2 - f2h2 - e³f + e2f2 = efh2 + efgh + gh³ + g2h2 + g2h2 - gh³ - e2g2 + e2gh

⇒ e2f2 + e2gh + efgh + efh2 - f2h2 + e2f2 = efh2 + efgh + g2h2 + g2h2 - e2g2 + e2gh

⇒ e2f2 - f2h2 + e2f2 = g2h2 + g2h2 - e2g2

⇒ f2(2e2 - h2) = g2(2h2 - e2) ___ [7]

⇒ e2(2f2 + g2) = h2(f2 + 2g2) ___ [8]

Let

a = g/hcf(f, g)

b = e/hcf(e, h)

c = h/hcf(e, h)

d = f/hcf(f, g)

Then, from [7] and [8], by definition of a, b, c, d, [5] and [6] above follow.

Thus in both cases, [5] and [6] are true. Let

k = a2 + 2d2

l = 2a2 + d2

m = 2b2 - c2

n = 2c2 - b2

Then, from [5] and [6],

b2k = c2l ___ [9]

a2n = d2m ___ [10]

2l - k = 3a2

2k - l = 3d2

so, as a and d are coprime by definition, hcf(k, l) = 1 or 3. b and c are not both multiples of 3, so neither m nor n is a multiple of 3. a and d are not both multiples of 3, so neither side of [10] is a multiple of 3, so neither a nor d is a multiple of 3. Thus, modulo 3, d2≡a2≡1, so k≡l≡0. Thus, splitting [9] into coprime parts:

b2 = l/3

c2 = k/3

2m + n = 3b2

2n + m = 3c2

so, as b and c are coprime by definition, hcf(m, n) = 1 or 3. As proved above, neither m nor n is a multiple of 3, so m and n are coprime. Thus, from [10],

a2 = m = 2b2 - c2

d2 = n = 2c2 - b2

⇒ d2 - c2 = c2 - b2 = b2 - a2

so (a2, b2, c2, d2) is an arithmetic progression of four squares; they are distinct, as a2 = m and d2 = n are coprime.

b2 + c2 < e2 + f2 + g2 + h2

= B + C by [1] and [2]

< B2 + C2

and we have our contradiction.

Commentary

I changed notation:

M2'smine
p1A
p2B
p3C
p4D
ae
bf
cg
dh
Ab
Bd
Cc
Da
1st sk
1st tl
2nd sm
2nd tn

I call the supposed numbers whose squares are in AP A, B, C, D for consistency with my renotated version of the proof at M1, in which I retained K044's use of A, B, C, D. I also retain my t, u, v, w, entailing that I rename M2's t.

I change some of the wording to conform to my notation of my version of the proof at K044.

M2 needlessly considers a "Case 1" of hcf(l, n)=3 whereas, to make the previous argument about f and h, it needed to be proved that neither l nor n is a multiple of 3. So this case needn't be mentioned.

M2 has "Note e≠g" in case 1 and "note e≠h" in case 2. It is not obvious to me at this stage that this is true. The only possible use for these remarks is to show that (a, b, c, d) are distinct. However, we have that a2 = m and d2 = n and that m and n are coprime, so this is already proved.


Home > Maths