# Fun with Repeating Decimals

So you may have noticed that when you divide an integer by 11, if it is not a multiple of 11, you get an alternating repeating decimal that looks like “.ABABABABABABAB…”. You may have also noticed that A and B always add up to 9. Let’s discuss why that is.

So let’s divide $n$ by 11, where $n$ is an integer less than 11. You only need to consider integers less than 11, because any improper fraction can be expressed as an integer plus a fraction where the numerator is less than the denominator.
For example:  $\frac{48}{11} = 4 \frac{4}{11}$

Now if you convert that fraction into a decimal you get an alternating repeating decimal, $\frac{4}{11} = 0.363636363...$, where 3 and 6 add to 9.
This decimal can also be expressed in another form by turning the decimal places into a sum:
$\frac{4}{11} = 3 \cdot \frac{1}{10} + 6 \cdot \frac{1}{100} + 3 \cdot \frac{1}{1000} + 6 \frac{1}{10000} + ...$

We can then generalize this for any integer $n$ less than 11.
$\frac{n}{11} = A \cdot \frac{1}{10} + B \cdot \frac{1}{100} + A \cdot \frac{1}{1000} + B \frac{1}{10000} +....$
Where A and B are integers.
So now we want to prove that $A+B = 9$.

First let’s put the above equation into a summation form, since the sum is infinitely long, but can be expressed simply because A is multiplied by odd powers of 10, and B is multiplied by even powers of 10. This is done to simplify the expression so there is one instance of A and one instance of B.
$\frac{n}{11} = A \cdot \sum_{j=0}^{\infty} 10^{-(2j+1)} + B \cdot \sum_{j=0}^{\infty} 10^{-(2j+2)}$

Now we want to simplify this a bit more to get rid of the infinite sum.
First let’s pull out some factors of $\frac{1}{10}$ to make the sums in each term equivalent.
$\frac{n}{11} = A \frac{1}{10} \sum_{j=0}^{\infty} 10^{-2j} + B \frac{1}{100} \sum_{j=0}^{\infty} 10^{-2j}$
$= \left( A \frac{1}{10} + B \frac{1}{100} \right) \sum_{j=0}^{\infty} 10^{-2j}$
Now the sum can be reduced to a number: $\sum_{j=0}^{\infty} 10^{-2j} = 1.01010101... = \frac{100}{99}$

So now we have:
$\frac{n}{11} = \left( A \cdot \frac{1}{10} + B \cdot \frac{1}{100} \right) \frac{100}{99}$
which can be reduced to a nice expression:
$9n = 10A + B$
From this we want to prove that $A+B=9$, where $n, A, B$ are integers.

To prove this, let’s plug in a more general equation $A+B = \mu$ and solve for $\mu$. The result is:
$n = A + \frac{\mu}{9}$
Now since $n$ and $A$ are integers, $\frac{\mu}{9}$ must also be an integer, meaning $\mu$ must be a multiple of 9. Since $A$ and $B$ can only hold one digit, the only options are 9 and 18. But $\mu =18$ only occurs when $n=11$, which corresponds to $\frac{11}{11}=1$.
So for the case $n<11$, it must be that $A+B=9$.