Skip to main content.

Solution to puzzle 71: Consecutive cubes and squares

Skip restatement of puzzle.Show that if the difference of the cubes of two consecutive integers is the square of an integer, then this integer is the sum of the squares of two consecutive integers.
(The smallest non-trivial example is: 83 − 73 = 169.  This is the square of an integer, namely 13, which can be expressed as 22 + 32.)


We have (m + 1)3 − m3 = 3m2 + 3m + 1 = n2, for some integers m and n.
Hence 12m2 + 12m + 4 = 4n2, from which 3(2m + 1)2 = (2n − 1)(2n + 1).

Now, 2n − 1 and 2n + 1 are relatively prime.
(By Euclid's algorithm, their greatest common divisor divides their difference, namely 2.  Since both are odd, their greatest common divisor must be 1.)

Therefore we must consider two possible cases, with a and b relatively prime:

Taking the first case, we have b2 = 3a2 + 2.
This is impossible, as any square is congruent to 0 or 1, modulo 3.

Taking the second case, notice that a must be odd.
Setting a = 2k + 1, we have 2n − 1 = (2k + 1)2 = 4k2 + 4k + 1.
Hence 2n = 4k2 + 4k + 2 = 2[k2 + (k + 1)2].
So n = k2 + (k + 1)2.

Therefore, if the difference of the cubes of two consecutive integers is the square of an integer, then this integer is the sum of the squares of two consecutive integers.


Remarks

Solutions of the equation are given by (m, k2 + (k + 1)2) = (xn, yn), where (x0, y0) = (0, 1), (x1, y1) = (7, 13), and (xn+1, yn+1) = (14xn − xn−1 + 6, 14yn − yn−1) for n greater than or equal to 1.
Source: American Mathematical Monthly 57 (1950), 190. 

The table below shows all non-negative solutions to (m + 1)3 − m3 = [k2 + (k + 1)2]2, for k less than or equal to 109.

mk
00
72
1049
145535
20272132
282359494
39327601845
547762876887
76293526425704
1062631741595930
148005508552358017
20614508023191336139
287123057239204986540
39991082933256718610022
557003930493202469453549
77580639439715775259204175
1080558912851088832967363152

Further reading

  1. Pell's Equation
  2. Online Encyclopedia of Integer Sequences: A001921 and A001571

Source: Postal Problem Sheet. (Page since taken down.) (Originally due to R. C. Lyness.)

Back to top