TITLE: Why does $\frac{1 }{ 99989999}$ generate the Fibonacci sequence?
QUESTION [30 upvotes]: $\frac{1}{99989999} = 1.00010002000300050008001300210034005500890144... \times 10^{-8}$ 

(Link), which includes the Fibonacci sequence $(1\ 1\ 2\ 3\ 5\ 8\ 13\ 21\ 55\ 89\ 144\ldots )$.
This is fascinating to me but I can't figure out how this works, and a Google search doesn't seem to reveal anything.

REPLY [7 votes]: This answer is meant to pick up where Henning Makholm's answer left off and addresses the

Eventually this will create a repeating digit sequence somehow.

part. The explanation that follows is due to Allen Schwenk and the last part of his article in Math Horizons titled An Unanticipated Decimal Expansion. All the credit goes to him.

Spoiler: The length of the period for the decimal expansion is $496620$ digits. 

The length of the period for the expansion: Any fraction of the form $1/D$ may be examined, with period of length $p$ and an irregular lead in sequence of $k$ digits. It must look like this, where we have displayed the irregular lead-in and the first two periods
$$
\frac{1}{D}=0.a_1a_2\ldots a_ka_{k+1}a_{k+2}\ldots a_{k+p}a_{k+1}a_{k+2}\ldots a_{k+p}.\tag{1}
$$
When we multiply the fraction in $(1)$ by $10^{p+k}$ and subtract the original fraction times $10^k$, everything beyond the decimal point drops out. In other words, we have formed an integer $N$ where
$$
\frac{1}{D}10^{p+k}-\frac{1}{D}10^k=\frac{10^{p+k}-10^k}{D}=N.
$$
This leads to the integer equation
$$
(10^p-1)\cdot 10^k=ND.
$$
Now focusing on $D=998999$, we see that it factors into two primes
$$
D=998999=179\cdot 5581.
$$
Since neither prime shares a factor with $10^k$, we are forced to agree that $N=10^k M$ for another integer $M$. The equation may be rewritten as
$$
10^p-1=MD,
$$
implying that the solution has $k=0$; that is, there is no lead-in sequence. We are forced to conclude that $10^p\equiv1\bmod 179$ and $10^p\equiv1\bmod 5581$. This means that $d_1$, the order of $10\mod 179$, must be a divisor of $178$ (by Euler's theorem on finite groups) and also of the period $p$. Likewise, $d_2$, the order of $10\mod 5581$, must be a divisor of $5580$ and also of $p$. In fact, we require $p=\operatorname{lcm}(d_1,d_2)$. Moreover, $178=2\cdot 89$, so the only candidates for the order $d_1$ are $2, 89$, and $178$. Clearly $10^2\not\equiv 1\bmod 179$. What about $10^{89}$? Quick inspection shows that
$$
10^{11} \equiv 157\bmod 179\\[0.5em]
10^{22} \equiv 157^2 \equiv 126\bmod 179\\[0.5em]
10^{44} \equiv 126^2 \equiv 124\bmod 179\\[0.5em]
10^{88} \equiv 124^2 \equiv 161\bmod 179\\[0.5em]
10^{89} \equiv 1610 \equiv -1\bmod 179
$$
The order of $10\bmod 179$ is $d_1=178$.
Similarly, $5580=2^2\cdot 3^2\cdot 5\cdot 31$. This has $36$ possible divisors, and we can check (a tedious task) each of these powers of $10\bmod 5581$. We find that the only power that reduces to $1\bmod 5581$ is $10^{5580}$. So $d_2=5580$, and $p=\operatorname{lcm}(178,5580)=496620$.