# Problem #1

Last updated on May 17, 2005.

Question: I am a two digit number. The first two digits and the last two digits of my value squared are identical. What am I?

(ab)2 = (10a + b)2 = 100a2 + 20ab + b2 = ccdd

Thus, d = b2 (mod 10).

Note: Mod 10 means the remainder when the number is divided by 10. Two numbers are equal mod 10 if after you divide them by 10, their remainders are equal. Or when you subtract them, their difference is a multiple of 10. 15 and 5 are equal mod 10 since 15 - 5 is a multiple of 10.

Therefore, d = 0, 1, 4, 5, 6 or 9.

Step I:

If (ab)2 = ccdd, then ccdd = 11 * (0c0d) ⇒ 11 | ccdd ⇒ 11 | (ab)2 ⇒ 11 | ab (since 11 is prime).

Thus, a = b.

Note: Since 11 | ab, then 112 | (ab)2 ⇒ 112 | ccdd ⇒ 11 | c0d0 ⇒ 11 | (c + d).

Step II:

a = b = 0 ⇒ c = d = 0 (single digit).

∴ a = b ≥ 1.

b ≥ 1 ⇒ d ≥ 1 (see gray digits in Squares table).

Note: Since 11 | (c + d), c ≠ 0, d ≠ 0, and c + d ≤ 18, then c + d = 11.

Step III:

For any odd, single-digit number b, b2 has an even tens digit. Thus, 20ab + b2 = dd (mod 10) must have the same odd digit for both places. However, 20ab + b2 will always have an even digit in the tens place because b2 is even in the tens place (see red digits in Squares table) and 20ab is 2ab in the tens place, which is also an even number. Thus, b and d have to be even. Here are all the possibilities for further elaboration.

• d = 1 ⇒ b = 1 ⇒ 100a2 + 20a + 1 = cc11 ⇒ 20a + 1 = 11 ⇒ 2a = 1 (mod 10) (impossible)
• d = 1 ⇒ b = 9 ⇒ 100a2 + 180a + 81 = cc11 ⇒ 180a + 81 = 11 ⇒ 8a + 8 = 1 (mod 10) (impossible)
• d = 5 ⇒ b = 5 ⇒ 100a2 + 100a + 25 = cc55 ⇒ 25 = 55 (impossible)
• d = 9 ⇒ b = 3 ⇒ 100a2 + 60a + 9 = cc99 ⇒ 6a = 9 (mod 10) (impossible)
• d = 9 ⇒ b = 7 ⇒ 100a2 + 140a + 49 = cc99 ⇒ 14a + 4 = 9 (mod 10) (impossible)

Thus, d = 4 or 6.

Step IV:

By the same reasoning, for any even, single-digit number b, if b2 has the first digit odd, 20ab + b2 = dd (mod 10) must have the same even digit for both places. However, 20ab + b2 will always have an odd digit in the tens place because b2 is odd in the tens place (see blue digits in Squares table) and 20ab is 2ab in the tens place which is even. Thus, d = 6 is impossible.

• d = 6 ⇒ b = 4 ⇒ 100a2 + 80a + 16 = cc66 ⇒ 8a + 1 = 6 (impossible)
• d = 6 ⇒ b = 6 ⇒ 100a2 + 120a + 36 = cc66 ⇒ 120a + 3 = 6 (impossible)

Hence, d = 4 is our only solution and b = 2 or 8.

Step V:

Since b = 2 or 8, a ≥ 3 and a = b, then a = b = 8.

Since d = 4 and c + d = 11, then c = 7.

(ab)2 = 882 = 7744 = ccdd.

Thus, a = b = 8, c = 7 and d = 4 is the unique solution.