When $x$ is divided by $y$, and $x$ is not divisible by $y$, what is the maximum number of decimal places? Somewhere (I will provide reference once I remember where I got this statement from), I read that:

"When $x$ is divided by $y$, and the resulting number is a decimal *, then the maximum number of recurring digits in the result is $(y-1)$ "
*Definition of decimal: A number in the form of $a$, or in other words, a constant. Examples: 1.23 or 3.63 or 28... etc.

I have found this true for many values of $\frac{x}{y}$.
Examples:
$1/2 = 0.5$ The recurring digits is 5
$1/3 = 0.\overline3$ The recurring digit is 3
$1/7 = 0.\overline{142857}$ The recurring digits are 142857
$1/11 = 0.\overline{09}$ The recurring digits are 09.
The statement is true at the moment because $2>1, 3>1, 7>6, 11>2$
Is there a good algebraic proof for this?
 A: Consider what it means to compute $x/y$ in decimal using long division. You have your remainder, $r_{i-1}$, from the previous digit calculation. You then "drop down a zero" to get $10r_{i-1}$ and divide by $y$; the quotient
$$\left\lfloor \frac{10r_{i-1}}{y}\right\rfloor$$
becomes the next digit, and you also calculate a new remainder $r_i = 10r_{i-1}\bmod y$.
Notice that this process depends only on the previous remainder $r_{i-1}$. As soon as you hit a remainder $r_i$ that matches some remainder $r_{\mathrm{prev}}$ that you have seen before, you will have $r_{i+1} = r_{\mathrm{prev}+1}$, etc, so that the decimal digits will start to repeat.
How long can you go without repeating? The maximum number of distinct remainders you can get when dividing by $y$, which is $y$ itself. The reason that the period is at most $y-1$ digits long, and not $y$, is that if you ever hit zero as a remainder, the long division terminates and you do not get a repeating decimal at all; therefore the set of possible remainders you can encounter while computing the repeating part of a decimal expansion is just the $y-1$ numbers $\{1,\ldots,y-1\}$.
