Products of Repdigit Numbers

From ProofWiki
Jump to: navigation, search

Fun Fact

Professor Stewart opens a mathematical miscellany with this delightful series:

\(\displaystyle \left({8 \times 8}\right) + 13\) \(=\) \(\displaystyle 77\)
\(\displaystyle \left({88 \times 8}\right) + 13\) \(=\) \(\displaystyle 717\)
\(\displaystyle \left({888 \times 8}\right) + 13\) \(=\) \(\displaystyle 7117\)
\(\displaystyle \left({8888 \times 8}\right) + 13\) \(=\) \(\displaystyle 71117\)
\(\displaystyle \left({88888 \times 8}\right) + 13\) \(=\) \(\displaystyle 711117\)
\(\displaystyle \left({888888 \times 8}\right) + 13\) \(=\) \(\displaystyle 7111117\)

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:

\(\displaystyle \left({7 \times 6}\right) + 2\) \(=\) \(\displaystyle 44\)
\(\displaystyle \left({77 \times 6}\right) + 2\) \(=\) \(\displaystyle 464\)
\(\displaystyle \left({777 \times 6}\right) + 2\) \(=\) \(\displaystyle 4664\)
\(\displaystyle \left({7777 \times 6}\right) + 2\) \(=\) \(\displaystyle 46664\)
\(\displaystyle \left({77777 \times 6}\right) + 2\) \(=\) \(\displaystyle 466664\)
\(\displaystyle \left({777777 \times 6}\right) + 2\) \(=\) \(\displaystyle 4666664\)

and so on.


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

\(\displaystyle \left({6_8 \times 6_8}\right) + 11_8\) \(=\) \(\displaystyle 55_8\)
\(\displaystyle \left({66_8 \times 6_8}\right) + 11_8\) \(=\) \(\displaystyle 515_8\)
\(\displaystyle \left({666_8 \times 6_8}\right) + 11_8\) \(=\) \(\displaystyle 5115_8\)
\(\displaystyle \left({6666_8 \times 6_8}\right) + 11_8\) \(=\) \(\displaystyle 51115_8\)
\(\displaystyle \left({66666_8 \times 6_8}\right) + 11_8\) \(=\) \(\displaystyle 511115_8\)
\(\displaystyle \left({666666_8 \times 6_8}\right) + 11_8\) \(=\) \(\displaystyle 5111115_8\)

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 $\left[{rrr \ldots rrr}\right]_b$ to any base $b$ as:

$\displaystyle \left[{rrr \ldots rrr}\right]_b = \sum_{k \mathop = 0}^n r b^k$

Thus:

\(\displaystyle \left[{rrr \ldots rrr}\right]_b \times s\) \(=\) \(\displaystyle s \sum_{k \mathop = 0}^n r b^k\)
\(\displaystyle \) \(=\) \(\displaystyle \sum_{k \mathop = 0}^n r s b^k\)

Let $p = r s$.


There are two cases to consider here.


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

$\left[{rrr \ldots rrr}\right]_b \times s = \left[{ppp \ldots ppp}\right]_b$

and the pattern is obvious and boring.

An example here (using conventional decimal notation):

\(\displaystyle \left({2 \times 3}\right) + 0\) \(=\) \(\displaystyle 6\)
\(\displaystyle \left({22 \times 3}\right) + 0\) \(=\) \(\displaystyle 66\)
\(\displaystyle \left({222 \times 3}\right) + 0\) \(=\) \(\displaystyle 666\)
\(\displaystyle \left({2222 \times 3}\right) + 0\) \(=\) \(\displaystyle 6666\)
\(\displaystyle \left({22222 \times 3}\right) + 0\) \(=\) \(\displaystyle 66666\)
\(\displaystyle \left({222222 \times 3}\right) + 0\) \(=\) \(\displaystyle 666666\)

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:

\(\displaystyle \left[{rrr \ldots rrr}\right]_b \times s\) \(=\) \(\displaystyle \sum_{k \mathop = 0}^n p b^k\)
\(\displaystyle \) \(=\) \(\displaystyle \sum_{k \mathop = 0}^n \left({p_1 b + p_2}\right) b^k\)
\(\displaystyle \) \(=\) \(\displaystyle p_1 b^{n+1} + \sum_{k \mathop = 1}^n \left({p_1 + p_2}\right) b^k + p_2\)

Let $p_1 + p_2 = q$.


Again, there are two cases to consider:


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

$\left[{rrr \ldots rrr}\right]_b \times s = \left[{p_1 qqq \ldots qqq p_2}\right]_b$

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

$\left[{rrr \ldots rrr}\right]_b \times s + \left({p_1 - p_2}\right) = \left[{p_1 qqq \ldots qqq p_1}\right]_b$


An example here (using conventional decimal notation):

\(\displaystyle \left({6 \times 4}\right) - 2\) \(=\) \(\displaystyle 22\)
\(\displaystyle \left({66 \times 4}\right) - 2\) \(=\) \(\displaystyle 262\)
\(\displaystyle \left({666 \times 4}\right) - 2\) \(=\) \(\displaystyle 2662\)
\(\displaystyle \left({6666 \times 4}\right) - 2\) \(=\) \(\displaystyle 26662\)
\(\displaystyle \left({66666 \times 4}\right) - 2\) \(=\) \(\displaystyle 266662\)
\(\displaystyle \left({666666 \times 4}\right) - 2\) \(=\) \(\displaystyle 2666662\)

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:

\(\displaystyle \left[{rrr \ldots rrr}\right]_b \times s\) \(=\) \(\displaystyle \sum_{k \mathop = 0}^n p b^k\)
\(\displaystyle \) \(=\) \(\displaystyle p_1 b^{n+1} + \sum_{k \mathop = 1}^n \left({p_1 + p_2}\right) b^k + p_2\)
\(\displaystyle \) \(=\) \(\displaystyle p_1 b^{n+1} + \sum_{k \mathop = 1}^n \left({b + t}\right) b^k + p_2\)
\(\displaystyle \) \(=\) \(\displaystyle \left({p_1+1}\right) b^{n+1} + \sum_{k \mathop = 2}^n \left({t + 1}\right) b^k + t b + p_2\)

Putting $p_1 + 1 = p_3$ and $u = t + 1$, and noting that from above $u < b$, we have:

$\left[{rrr \ldots rrr}\right]_b \times s = \left[{p_3 uuu \ldots uu t p_2}\right]_b$

The final step is to calculate the difference between $\left[{p_3 uuu \ldots uu t p_2}\right]_b$ and $\left[{p_3 uuu \ldots uuu p_3}\right]_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.

$\blacksquare$


Sources