## Le Monde puzzle [#1114]

**A**nother very low-key arithmetic problem as Le Monde current mathematical puzzle:

32761 is 181² and the difference of two cubes, which ones? And 181=9²+10², the sum of two consecutive integers. Is this a general rule, i.e. the root z of a perfect square that is the difference of two cubes is always the sum of two consecutive integers squared?

The solution proceeds by a very dumb R search of cubes, leading to

34761=105³-104³

The general rule can be failed by a single counter-example. Running

sol=0;while(!sol){ x=sample(2:1e3,1) y=sample(1:x,1)-1 sol=is.sqr(z<-x^3-y^3) z=round(sqrt(z)) if (sol) sol=(trunc(sqrt(z/2))^2+ceiling(sqrt(z/2))^2!=z)}

which is based on the fact that, if z is the sum of two consecutive integers squared, a² and (a+1)² then

2 a²<z<2 (a+1)²

Running the R code produces

x=14, y=7

as a counter-example. (Note that, however, if the difference of cubes of two consecutive integers is a square, then this square can be written as the sum of the squares of two different integers.) Reading the solution in the following issue led me to realise I had missed the consecutive in the statement of the puzzle!

October 18, 2019 at 2:24 pm

13^2 = 8^3 -7^3 is the first of those integers, and it works since 13 = 2^2 + 3^2

The second is : 181^2 = 105^5-104^3, and it works since 181 = 9^2+10^2

But the third (if I have not made any mistakes) is 105 339^2 = 60818^3-60817^3. But 105 339 is > 228^2+229^2 but <229^2+230^2.

October 19, 2019 at 2:24 pm

Thanks. The way I understand the puzzle at this late stage, the squares do not have to be consecutive.

October 17, 2019 at 8:12 am

[…] article was first published on R – Xi'an's Og, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) […]