Length of period of decimal expansion of a fraction Each rational number (fraction) can be written as a decimal periodic number. Is there a method or hint to derive the length of the period of an arbitrary fraction? For example $1/3=0.3333...=0.(3)$ has a period of length 1. 
For example: how to determine the length of a period of $119/13$?
 A: The length of the period is given by the multiplicative order of $10 \pmod q$, where $q$ is your quotient. It is closely related to the discrete logarithm. Wikipedia lists several algorithms that are faster than going through all the powers of ten, which is relevant if you're dealing with very large numbers (hundreds of digits).
A: Assuming there are no factors of $2,5$ in the denominator, one way is just to raise $10$ to powers modulo the denominator.  If you find $-1$ you are halfway done.  Taking your example:  $10^2\equiv 9, 10^3\equiv -1, 10^6 \equiv 1 \pmod {13}$ so the repeat of $\frac 1{13}$ is $6$ long.  It will always be a factor of Euler's totient function of the denominator.  For prime $p$, that is $p-1$.
A: First you have to simplify to the lowest integer denominator.
Then, the proof for finiteness of repeating part of the decimal representation involves the pigeonhole principle.  When you keep on dividing, at some point you will run into a repeat value for the remainder.  Given that the remainders that keep the operation going range from 1 to (denominator-1), the possible number of pigeonholes is (denominator-1) as the number of pigeonholes; so that's your worst possible case scenario - in any base.
The particular cases, as described by the other answers, depend on the base, because the denominator may have a special relationship with the base.


*

*e.g., in base 10 fractions over 3 will have one repeating decimal, (3) or (6), as 3 divides 9(=10-1), and the remainder will keep repeating.   

