# Identify the period of a number with a periodic expansion

Given a number with a periodic expansion, identify the the period and use a geometric series trick to identify the number.

I have no idea how to do this. Suggestions or links to good websites on this topic?

-

## 2 Answers

For example, $1/9 = 0.1111111\dots$, means in the number system of base 10, that $$\frac19 = \frac1{10}+\frac1{100}+\frac1{1000} + \dots = \sum_{n\ge 1} \left(\frac1{10}\right)^n$$ For $1/7=0.142857142857142857\dots$, it can be written as $$\frac17 = 142857\cdot \sum_{n\ge 1}\frac1{{1000000}^n}$$ Note that if $p$ is prime ($p\ne 2,5$), then by Fermat's little theorem, $10^{p-1}\equiv 1 \pmod p$, that is $p|\underbrace{999\dots999}_{(p-1)\text{ pieces}}$.

-
Correct me if I am wrong, when identifying the period of a decimal expansion of an inverted prime, don't you also need to take into account whether or not your base is a primitive root modulo that prime? I.e., if $p = 11$, then 10 is not a primitive root modulo 11, so the period length of the decimal expansion of $\frac{1}{11}$ is a divisor of $p-1 = 11-1 = 10$ (2 in this case, $\frac{1}{11} = 0.090909\dots$ and $11 \mid 99$) instead of just $p-1$. I hope that I have the right idea in mind... – Clark Zinzow Mar 22 '14 at 20:02

Hint $\rm\ \ r = 0.121212...\, =\, \dfrac{12}{10^2} + \dfrac{12}{10^4} + \dfrac{12}{10^6} + \,\cdots\, =\, 12\,\left(\dfrac{1}{10^2} + \dfrac{1}{10^4} + \dfrac{1}{10^6}+\,\cdots\right)$

Since $\rm\ \dfrac{1}{1-x}\ =\ 1 + x + x^2 + x^3\,+\cdots,\ |x| < 1,\$ subtracting $1$ yields

that $\rm\,\ \ \dfrac{x}{1-x}\ =\ x + x^2 + x^3 +\, \cdots.\$ Now apply this to the above series.

Alternatively $\rm\ r = \overline {0.121212}\:\Rightarrow\:100\, r\, =\, 12 + r,\:$ so $\rm\:99r = 12,\:$ so $\rm\: r = 12/99.$

The same idea works generally, e.g. see here.

-
I don't get what you're saying with the 1/(1-x) thing? – user39794 Sep 27 '12 at 13:29
@Allison That's the formula for the sum of a geometric series, which you are hinted to employ. – Bill Dubuque Sep 27 '12 at 13:31
So how would you write out something with a numerator that isn't 1? Like your 12/99 example? Thanks for the help by the way, I was sick and missed this whole lecture so I'm generally confused about all this. – user39794 Sep 27 '12 at 13:38
@Allison Hint $12/99 = 12(1/99)$ – Bill Dubuque Sep 27 '12 at 13:40
Perfect! That's what I thought but I wasn't sure if it worked like that when multiplying through a whole series. Thank you! – user39794 Sep 27 '12 at 13:41