# Providing an explanation for trend found in numbers and divisibility.

Let $A$ and $B$ be integers with the same number of digits (like 35 and 92). Why is it that $$\underbrace{AA\ldots A}_{W\ A's} \cdot \underbrace{BB\ldots B}_{Z\ B's} = \underbrace{AA\ldots A}_{Z\ A's}\cdot \underbrace{BB\ldots B}_{W\ B's}?$$ (Here the $A$'s and $B$'s are being concatenated, not multiplied.) For example A=3 and B=8, W=2 and Z=4, why would 33*8888=3333*88? Why does this equation work?

I was drinking coffee when I randomly came up with this so I was not quite successful in finding an answer. I tried explaining this trend using the logarithmic graph below. I was trying to see whether changing the difference between W and Z would have an effect on the trend and it didn't. What I noticed did have a trend was the actual smaller number between W and Z. The larger the smallest of the two was, the more the A_W/A_Z function began to behave like a regular logarithm. Can someone try to explain 1- why the expression even works in the first place and 2- why the division of AW/AN approaches a 10^n where n= the difference between W and N The reason is that $$33\cdot8888 = (3\cdot11)(8\cdot1111) = (8\cdot11)(3\cdot1111) = 88\cdot3333.$$ In general, if $A$ and $B$ have $N$ digits, we have $$\underbrace{AA\ldots A}_{W\ A's} = A\cdot \underbrace{1\underbrace{00\ldots0}_{N-1\ 0's}1\underbrace{00\ldots0}_{N-1\ 0's}100\ldots\ldots01\underbrace{00\ldots0}_{N-1\ 0's}1}_{W\ 1's} = A\cdot X.$$ Let $X$ be the number on the right that is multiplied by $A$. Similarly we define $Y$ as the number on the right of the below equation that is multiplied by $B$. $$\underbrace{BB\ldots B}_{Z\ B's} = B\cdot \underbrace{1\underbrace{00\ldots0}_{N-1\ 0's}1\underbrace{00\ldots0}_{N-1\ 0's}100\ldots\ldots01\underbrace{00\ldots0}_{N-1\ 0's}1}_{Z\ 1's}= B\cdot Y.$$ Putting everything together, we get $$\underbrace{AA\ldots A}_{W\ A's} \cdot \underbrace{BB\ldots B}_{Z\ B's} = (A\cdot X)(B\cdot Y) = (A\cdot Y)(B\cdot X) = \underbrace{AA\ldots A}_{Z\ A's}\cdot \underbrace{BB\ldots B}_{W\ B's}.$$
It might be worth mentioning that the numbers $X$ and $Y$ are given by geometric series: $$X=10^{N(W-1)}+10^{10(W-2)}+...+10^{1N}+10^{0N}=\frac{10^{NW}-1}{10^N-1}\\ Y=10^{N(Z-1)}+10^{10(Z-2)}+...+10^{1N}+10^{0N}=\frac{10^{NZ}-1}{10^N-1}.$$
Let $A^W$ denote the numeral formed by concatenating $W$ copies of $A$, and let $N$ be the length of $A$. By inspection we have \begin{align}A^W &=A^{W-1}10^N + A \end{align} and by applying this recursively, we find \begin{align}A^W &=A^{W-1}10^N + A\\ &=(A^{W-2}10^N+A)10^N+A\\ &=A^{W-2}10^{2N}+A\,10^N+A\\ &...\\ &=A\cdot(10^{(W-1)N}+10^{(W-2)N}+...+10^{1N}+10^{0N})\\ &=A\cdot\frac{10^{NW}-1}{10^N-1} \end{align}
and similarly for $B^Z$.