# Special palindromic pattern of $(\frac{10^n-1}{9})^2$

I noticed a repetitive, palindromic pattern when I've performed exponentiation with $$10$$. That is: $$(\frac{10^n-1}{9})^2 \text{ has a palindromic pattern, }\forall\:n\in [1;9]\:(n\in \mathbb{N})$$

We define $$f(n)=(\frac{10^n-1}{9})^2$$.

• $$f(1) = \color{red}{1}$$

• $$f(2) = \color{red}{1}\color{blue}{2}\color{red}{1}$$

• $$f(3) = \color{red}{1}\color{blue}{2}\color{green}{3}\color{blue}{2}\color{red}{1}$$

$$...$$

• $$f(9) = \color{red}{1}\color{blue}{2}\color{green}{3}\color{pink}{4}\color{magenta}{5}6\color{grey}{7}\color{brown}{8}\color{orange}{9}\color{brown}{8}\color{grey}{7}6\color{magenta}{5}\color{pink}{4}\color{green}{3}\color{blue}{2}\color{red}{1}$$*

I was wondering why this expression has such results. Not only they are palindromic, they are in fact using ascending consecutive digits until the sequence repeats, in descending order. Can anyone explain why the structure of these numbers is so strange?

• This is not correct. As you have defined $f$, $f(2)=11, f(3)=111$ and $f(n)$ is the repunit with $n\ 1$s – Ross Millikan Jul 27 '17 at 17:02
• EDIT: Fixed. Sorry for the confusion – Mr. Xcoder Jul 27 '17 at 17:03
• If you write out the multiplication of $111 \cdot 111$ the pattern is clear. – Ross Millikan Jul 27 '17 at 17:03
• So $f(10)$ also follows the pattern in a different way... – MAN-MADE Jul 27 '17 at 17:08

You're squaring $\frac{10^{n}-1}{10-1}=10^{n-1}\sum_{k=0}^{n-1}(\frac{1}{10})^k$. To square $\sum_k x^k$ note each $x^p$ with $0\le p\le 2n-2$ can be achieved in one of $p+1$ ways for $p\le n$ and $2n-p-1$ ways otherwise. (You can think of it as a binomial-theorem truncation of $(1+x)^{-2}$, though the high-power coefficients are a little different because some ways you could try to achieve them require a factor beyond $x^{n-1}$.) For $n\le 10$, all coefficients are single-digit numbers, giving the pattern you observed. You may wish to use similar logic to see, for example, what happens with cubes.

Write out several values for $10^n-1$. You'll see $n=1 \to 9$, $n=2 \to 99$, $\cdots, n \to 99\underset{n}{\underbrace{\,\ldots\,}}99$ and

$$\frac{99\overset{n}{\overbrace \ldots}99}{9} = 11\underset{n}{\underbrace{\,\ldots\,}}11$$

and the squares of $11\ldots11$ form this pattern you've noticed,

\begin{align*} 1^2 &= 1 \\ 11^2 &= 121 \\ 111^2 &= 12321 \\ 1111^2 &= 1234321 \\ &\ \vdots \\ 111\ 111\ 111^2 &= 12\ 345\ 678\ 987\ 654\ 321 \\ \end{align*}

\begin{align*} 11 \times 11 &= \begin{matrix} 1 & 1 & \\ & 1 & 1 & + \\ 1 & 2 & 1 \end{matrix} \\ \\ 111 \times 111 &= \begin{matrix} 1 & 1 & 1 & & \\ & 1 & 1 & 1 & \\ & & 1 & 1 & 1 & + \\ 1 & 2 & 3 & 2 & 1 \end{matrix} \\ \\ 1111 \times 1111 &= \begin{matrix} 1 & 1 & 1 & 1 & & & \\ & 1 & 1 & 1 & 1 & & \\ & & 1 & 1 & 1 & 1 & \\ & & & 1 & 1 & 1 & 1 & + \\ 1 & 2 & 3 & 4 & 3 & 2 & 1 \end{matrix} \end{align*} etc. Due to the rotational symmetry of these parallograms, and the fact that, for $n \le 9$ there will be no carry-over in any column, you're going to get symmetric digits.

A very nice way to see this only using the multiplication rule of $5-6$ grade.

I am giving an example.

$11111\times 11111=$

\begin{array}{cc} +000011111 \\ +000111110 \\ +001111100 \\ +011111000 \\ +111110000\\ =123454321 \end{array}

It can be easily seen why this pattern you are getting.