D12. Strange Coincidence

Contributed by Ian Stewart, University of Warwick

Let’s listen in on a conversation between siblings divided by math, so to speak:

“That’s amazing!” said Mathophila. “The squares of three consecutive positive whole numbers add up to the same number as the squares of the next two numbers.”

“Oh, no big deal, that must happen all the time,” replied her brother, Innumeratus.

“I don’t know, it seems like an amazing coincidence to me!” retorted Mathophila.

Find the smallest collection of numbers with the described property, and settle the argument between the siblings: determine whether there are infinitely many sets of numbers as described by Mathophila, or a finite number (and if so, figure out exactly how many solutions there are).

This problem originally appeared in the Prisoner’s Dilemma in the 2023 Spring issue of the PMP Newsletter. Solutions are no longer being accepted for this Dilemma.

Show solution?  
Solution.

We received solutions from Chris Bistryski, William Keehn, Blazej Kot, and Robert Noll, all PMP participants. All of the solutions proceeded algebraically by assigning a variable to the value of one of Mathophila’s numbers, which determines the others since her five numbers are all consecutive. But Robert pointed out that the algebra works out most smoothly if you let your variable n represent the middle number. Then you get the following equation satisfied by Mathophila’s numbers: ( n 2 ) 2 + ( n 1 ) 2 + n 2 = ( n + 1 ) 2 + ( n + 2 ) 2 .

This relationship simplifies to n 2 12 n = 0 , or factoring, n ( n 12 ) = 0 . Hence n is either 0 or 12, but the smaller value would make some of the numbers negative. Hence the only set of five numbers with Mathophila’s properties is 10 2 + 11 2 + 12 2 = 13 2 + 14 2 . Amusingly enough, the common value of the left and right hand sides is the number of days in a year (as long as it’s not a leap year).

Chris, however, took this conclusion as merely the start of an in-depth exploration. He first asked what would happen if Mathophila had a set of 2 r + 1 consecutive numbers so that the sum of the squares of the first r + 1 of them is the sum of the squares of the next r of them (so that in Mathophila’s original case, r = 2 ). He proved in this more general setting that the middle number of the set must be 2 r ( r + 1 ) , or just four times the r th triangular number. For example when r = 3 , 21 2 + 22 2 + 23 2 + 24 2 = 25 2 + 26 2 + 27 2 .

See if you can match Chris’s accomplishment (you might want to try using induction on the value of r , or you may find another method). Not content to stop there, Chris asks whether for any whole numbers r and k both greater than one, the sum of ( r + k ) consecutive squares is equal to the sum of the next r consecutive squares. For example, the simplest case of this question is r = k = 2 , but the equation corresponding to the first one above simplifies to 2 n 2 14 n 7 = 0 . This quadratic has only one positive solution n = ( 7 + 3 7 ) / 2 , so there are no whole-number solutions. In fact, Chris was able to show that there are no whole-number solutions for any r when k = 2 . But that still leaves a whole lot (infinitely many!) of other possibilities for k , so if any reader is able to to find (an) other k value or values that allow whole-number solutions (for one or more values of r ), we’ll be happy to post these findings here, so send in your work any time!