I am trying to understand (I've already seen the rigorous proof in a real analysis class) why exactly rational numbers have periodic decimal expansions. I have basically boiled it down to proving a seemingly simple statement of number theory (I say seemingly because I don't know any number theory): For all prime numbers p>5, there exists a natural number n such that (10^n)-1 is divisible by p. However, I have absolutely no idea how to prove it. I don't know anything about modulo arithmetic, so if possible please try to give me an explanation which doesn't involve it. If necessary it would be helpful if you explained any modulo arithmetic I would need. Any help would be greatly appreciated. Thank you in advance. P.S. The reason why this statement is related to periodic decimal expansions is that all real numbers between 0 and 1 with periodic decimal expansions can be written as a fraction the denominator of which is a number of the form (10^n)-1. (For simplicity I'm excluding the case of decimal expansions which have an initial segment then become periodic, like .38578787878...) So in order for a/b, where a<b, to have a periodic decimal expansion, a/b must equal m/((10^n)-1) for some natural numbers m and n. In other words, (a/b)*((10^n)-1) must be a natural number for some n. Therefore, assuming that a/b is written in simplest form, ((10^n)-1)/b must be an integer for some n, and thus (10^n)-1 must be divisible by b for some n. But the question of whether a number is divisible by a composite number can be answered by considering whether the first number is divisible by each of the prime factors of the second number. Hence my question.