Products of Repdigit Numbers

Fun Fact
opens a mathematical miscellany with this delightful series:

and so on.

Exploration
If we use the technique of long multiplication on that last line, we will be able to see the pattern:

888888 x    8 ---    64    640   6400  64000 640000 6400000 --- 7111104 ---

All we have to do is add a final $13$ to make the final number symmetrical.

A little experimentation shows that this sort of thing happens whatever digits you care to choose, for example:

and so on.

You can do this trick in any number base, for example:

and so on.

Analysis
Let us pick two digits $r, s$ and a base $b$ such that $r, s < b$.

We can express a repdigit number $\sqbrk {rrr \ldots rrr}_b$ to any base $b$ as:
 * $\ds \sqbrk {rrr \ldots rrr}_b = \sum_{k \mathop = 0}^n r b^k$

Thus:

Let $p = r s$.

There are two cases to consider here.

$(1) \quad$ Suppose $p < b$. Then:


 * $\sqbrk {rrr \ldots rrr}_b \times s = \sqbrk {ppp \ldots ppp}_b$

and the pattern is obvious and boring.

An example here (using conventional decimal notation):

and so on.

$(2) \quad$ Now suppose $p \ge b$.

Note that $p < b^2$ as both $r < b, s < b$.

So we can express $p$ as $p = p_1 b + p_2$.

So:

Let $p_1 + p_2 = q$.

Again, there are two cases to consider:

$(2a) \quad$ Suppose $q < b$. Then:


 * $\sqbrk {rrr \ldots rrr}_b \times s = \sqbrk {p_1 qqq \ldots qqq p_2}_b$

All we need to do is to add (or subtract) the difference between $p_1$ and $p_2$, and we get:


 * $\sqbrk {rrr \ldots rrr}_b \times s + \paren {p_1 - p_2} = \sqbrk {p_1 qqq \ldots qqq p_1}_b$

An example here (using conventional decimal notation):

and so on.

$(2b) \quad$ Suppose $q \ge b$.

Then from the Division Theorem $q$ can be expressed as $q' b + t$ where $0 \le t < b$.

We have that $p_1, p_2 < b$ so $q = p_1 + p_2 < 2 b$, so it immediately follows that $q' = 1$.

It can also be seen that $t < b - 1$ and so (this is important in a bit) $t + 1 < b$.

Similarly we can see that $p_1 < b - 1$ and so (similarly important in a bit) $p_1 + 1 < b$.

So $q = b + t$, and so:

Putting $p_1 + 1 = p_3$ and $u = t + 1$, and noting that from above $u < b$, we have:
 * $\sqbrk {rrr \ldots rrr}_b \times s = \sqbrk {p_3 uuu \ldots uu t p_2}_b$

The final step is to calculate the difference between $\sqbrk {p_3 uuu \ldots uu t p_2}_b$ and $\sqbrk {p_3 uuu \ldots uuu p_3}_b$ in order to form a symmetrical pattern.

An example of this case is the $888 \ldots 88 \times 8 + 13 = 7111 \ldots 1117$ given at the start of this page.