<s>[INST] 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?
Thanks in advance!
 [/INST] 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*}
</s>