It's said that a number N with 4 digits is a double-square number when it equals the sum of the squares of two numbers: one formed by the first two digits of N, in the order they appear in N and the other formed by the two last digits of N in the order they appear in N.

For example, 1233 is a double-square number since 1233 = 12^2 + 33^2. Find another double-square number.

8833

Placing the problem into an equation:

x^2 + y^2 = 100x + y, this is one equation for two variables. It's looks unsolvable, and this is precisely the hard part of the problem, because we naturally tend to forget that we already have one solution to this equation which is 1233. If you replace x = 12 you'll end up with:

y^2 - y - 1056 = 0, this case leads nowhere since delta < 0. But if you replace y = 33, then you'll have:

x^2 - 100x + 1056 = 0, this case gives you the problem's suggested solution 1233 and another one since delta > 0, which is 88 composing the answer 8833.

## Comments

Sign uporlog in with Facebookto comment.AakashVery good answer - this seems impossible at first...

Chris van EgmondBrute force programmatic solution in Python:

from math import pow [n for n in range(1000,10000) if pow(n/100,2)+pow(n%100,2)==n]

RaviNice, although brute forcing ruins all the fun! :)

In general, the space of solutions to this problem lie on the circle defined by 100x+y = x^2 + y^2. Here it is on WolframAlpha.

Chris van EgmondYeah I suppose I have to agree with you that a mathematical model is definitely nicer!

SalutariusIf the number isn't restricted to 4 digits, then we have a very easy solution: 10100 :D

aquawas easy..