Some numbers leave a signature when multiplied by themselves. They hide at the end of their own square, as if the calculation returned them intact.

The Square That Ends in Itself

Riddle statement

Find a two-digit number with this property:

when you square it, the last two digits of the result are again the number itself.

For example:

25^2 = 625

which ends in 25.

Is there another two-digit number with this property?

Show solution

Solution

The only two-digit numbers are 25 and 76.

The condition that the square ends in the number itself is:

$ n^2\equiv n\pmod{100}, $

that is:

$ n(n-1)\equiv0\pmod{100}. $

Since 100 is $4\cdot25$, solve separately modulo 4 and modulo 25. Two consecutive integers are coprime, so for their product to be divisible by a prime power, all of that prime power must divide one of the two factors.

Therefore:

$ n\equiv0\text{ or }1\pmod4 $

and

$ n\equiv0\text{ or }1\pmod{25}. $

Combining the four possibilities gives, modulo 100:

$ 0,\ 1,\ 25,\ 76. $

The first two are not two-digit numbers. The remaining ones are:

$ 25^2=625 $

and

$ 76^2=5776. $

Answer: the only two-digit numbers with this property are 25 and 76.