# Rational number with more than ten digits

Could we have a repeating rational decimal number with more than 10 repeating digits (something like $$0.0123456789801234567898...$$) after the decimal point?

What is the maximum number of repeating digits after the decimal point in a number?

Could the answer be generalized to state that we could / couldn’t have a repeating rational number in base $$b$$ with more than $$b$$ repeating digits?

• $\frac1{10^n-1}$ repeats after $n$ digits. $\frac1{b^n-1}$ repeats after $n$ digits in base-$b$.
– robjohn
Commented Oct 22, 2019 at 12:22
• The example in the previous comment has a repeating sequence of $n-1$ zeros followed by $1.$ If $n=15$ the decimal representation is $0.000000000000001000000000000001\ldots.$ Commented Oct 22, 2019 at 12:25

The period of a periodic sequence of digits can be as large as you like. To see this, multiply the number by $$10^T$$, where $$T$$ is the period, and then subtract the original number. Since this is definitely a whole number $$n$$ – the repeating parts of the sequence cancel out – the original must have been a rational number, specifically $$n/(10^T-1)$$.

• I'm not sure I understand this answer. Which number is "the original number"? (Or: I will give you the benefit of the doubt and pick my own original number and see what I can learn. I pick 5/9, follow this process, and get 5. What should I conclude from the fact that I got 5?) Commented Oct 22, 2019 at 20:43
• The OP seems to know that rational numbers are precisely those with periodic expansions in every base. By "the original number" I mean (the number represented by) "a periodic sequence of digits". The point of my answer is to show that a periodic sequence of digits always represents a rational number, no matter what the period of the sequence is. Also, I think you must have multiplied 5/9 by 9, in order to arrive at an answer of 9, but I suggest instead to multiply by $10^T$. Commented Oct 22, 2019 at 20:57
• Thanks, that clarifies what this answer is about! I guess to be really careful we'd need to verify that there are indeed digit sequences with large periods (and not that, say, any sufficiently long digit sequence is itself some repetitions of a shorter one), but perhaps that's obvious enough for OP. (As for multiplying by 9: roughly, yes, that's what I did. After all, the period of the digit sequence for 5/9 is T=1, so I multiplied 5/9 * 10^T = 5/9 * 10, then subtracted 5/9... which is indeed the same as 5/9 * 9.) Commented Oct 22, 2019 at 21:11
• Oh yes - I see what you mean. Commented Oct 22, 2019 at 21:14

This also happens for "ordinary" rational numbers. For instance, $$\frac1{17}$$ has a period of 16 digits, and $$\frac1{983}$$ has a period of 982 digits. Look up "full reptend prime" or "long prime" for more information about them.

• OK, I'll bite. How does $1/183$ have a repeat length of $182$ when the Euler totient of $183$ is only $120$? Misprint? Commented Oct 22, 2019 at 14:00
• @OscarLanzi Whoops, yeah. I was pulling the number off of OEIS' list, and meant 983. Thanks!
– user694818
Commented Oct 22, 2019 at 14:54

$$\dfrac1{17}=0.\color{green}{0588235294117647}0588235294117647\color{green}{0588235294117647}0588235294117647\cdots$$
I would like to add a intuitive answer. If you calculate the decimal representation of a fraction $$1/n$$ by hand, by long division on a sheet of paper, then in each step, you perform a division by $$n$$ and write the integer part of the quotient to the result. You also write down the remainder, append a zero and use that as input for the next step. When you get a remainder that you already had in a previous step, the result will start to repeat.