# Palindromic Pan digital Special Square wants you to reveal its Root

All you need is just Mathematical Logic and few minutes.

No calculators... no computers.

Concise Logic based answers are the preferred choice.

Given:

Palindromic Pan digital Perfect Square contains all the digits from one to nine in both descending as well as ascending sequence.

Please find the number and its nine digit root.

• I think you kind of gave it away with "both descending and ascending". Better would've been to say it contains each digit twice except for the middle digit. "Palindromic" takes care of the rest. – Darrel Hoffman May 20 at 12:23
• Yes..you are partially right..as per your suggestion, ruling out many other cases might be tough..anyway I like to vary the level of difficulty in the puzzles I create so that everybody can enjoy. This is kind of lollipop. – Uvc May 20 at 15:04

An answer with some logic explanation

First, the number must contain the 123456789 and 987654321 sub-sequences. Since only 1 of the digits can be reused (i.e. be contained in both sequences), so the number must be at least 9+9-1=17 digits long. Now, note that the square root is 9 digits long, so its square must be either 17 or 18 digits long. So, the search space is decreased to 4 numbers: 12345678987654321, 98765432123456789, 123456789987654321 and 987654321123456789.
Now, let $$S$$ be $$\sum\limits_{i=0}^n{x^n}$$. So, $$S^2=\sum\limits_{i=0}^n\sum\limits_{j=0}^n{x^{i+j}}$$. This can be reduced to $$1x^0+2x+3x^2+\dots+(n+1)x^n+\dots+3x^{2n-2}+2x^{2n-1}+1x^{2n}$$ (ones and zeroth powers are explicitly written for clarity), since both $$0$$ and $$2n$$ can be represented as a sum of 2 nonnegative integers not greater than $$n$$ in exactly one way ($$0+0$$ and $$n+n$$ respectively), $$1$$ and $$2n-1$$ in two ways ($$1+0,0+1$$ and $$n+(n-1),(n-1)+n$$), etc. Taking $$x=10$$ and $$n=8$$ (so $$n+1=9$$), we get the result: $$111111111^2=12345678987654321$$.

$$111111111^2=12345678987654321$$

• Need to know the logic needed to arrive at the result in proper steps – Uvc May 20 at 3:20
• Sorry but no logic involved for me... it's something I saw many, many years ago and remembered. – David May 20 at 3:23

David beat me to the answer, which is:

12345678987654321 = 11111111111 x 111111111

However, I'll attempt to supply some reasoning:

If you multiply a number that is just made up of 1 for all its digits, you get a pattern of increasing and then decreasing numbers:

11 x 11 = 121
111 x 111 = 12321
1111 x 1111 = 1234321
etc.

Breaking this down by digit we can see that the last digit is always 1 because there's only 1 in the digits column for both numbers. The next is always going to be 2 because there's 10 x 1 + 1 x 10, followed by 3 because of 100 x 1 + 10 x 10 + 1 x 100 and so on, until we get past the middle digit, where it starts decreasing back to one because the most significant digit is just the square of a power of 10.

However, once you get past 12345678987654321 the sequence breaks because of a carry.

• The sequence does keep going if you use a higher number base. That's a neat thing about this trick is it works in any number base b for up to b - 1 digits in the root. – Darrel Hoffman May 20 at 12:27