## Ask Professor Puzzler

Do you have a question you would like to ask Professor Puzzler? Click here to ask your question!

"Your blog post about palindromic squaring made me wonder - how many palindromic perfect squares are there?" ~D.

As a quick review for anyone who missed the post you referred to, a palindrome is a number (or word) that is the same forward and backward. For example 121 is a palindrome, because if you write it backwards, it's still 121.

So how many perfect squares are there that are palindromes? 121 is one example, but surely there must be others?

Yes. In fact, there are *infinitely many* perfect squares that are palindromes. Would you like a proof?

Let x = 10^{n} + 1.

Then x^{2} = (10^{n} + 1)(10^{n} + 1)

x^{2} = 10^{n}(10^{n} + 1) + 1(10^{n} + 1)

x^{2} = 10^{2n} + 10^{n} + 10^{n} + 1

x^{2} = 10^{2n} + 2·10^{n} + 1

Written in base ten notation, this number would have 2n + 1 digits. The (n + 1)^{th} digit would be 2, the first and last digits would be ones, and all the other digits would be zeroes. Since n+1 is halfway between 1 and 2n + 1 (note that n + 1 is the average of 1 and 2n + 1), the digits "mirror" each other, and the number is palindromic. This works for every positive integer n, which means there are an infinite number of palindromic perfect squares. Just so you can see an example of this, let n = 4. Then we have:

x = 10^{4} + 1 = 10001.

10001^{2} = 100020001, which is a palindrome.

Of course, these all take the same form; a one at the beginning and end, a two in the middle, and everything else zero. You can find ones that take different forms:

212^{2} = 44944

101101^{2} = 10221412201

111100001111^{2} = 12343210246864201234321

And I submit (without proof) that for every form you find, you can create infinitely many palindromic perfect squares by inserting zeroes between the digits of the number you square.