You may also like

problem icon

Euler's Squares


problem icon

Diophantine N-tuples


problem icon

There's a Limit


Really Mr. Bond


This is the solution sent in by Yatir Halevi. Thanks Yatir. A correct solution was also received from Andrei Lazanu.

Let's say we want to find the square of $a$

We know that $a^2 = a^2-b^2+b^2 = (a+b)\times(a-b)+b^2$and for every a, we can pick a certain b that will make the calculation$a^2$ as easy as possible.

For instance if we take $a=35$, we can take $b=5$, we get $35^2=(35+5)\times(35-5)+5^2 =40\times30+25 =1200+25 =1225$.

So, if$a$ is a number that ends with a 5: it can be written as $$a=10\times q + 5a^2=(10q+5)^2=(10q+5-5)\times(10q+5+5)+25=10q(10q+10)+25=10^2q(q+1)+25$$ So $a^2$is equal to $q(q+1)$ plus two zeros after it $(10^2)$ that are "stolen" by the 25 that is added on.