Proposition: Show that for an integer $n\geq 2$, the period of the decimal expression for the rational number $\frac{1}{n}$ is at most $n-1$. I'm unsure of where to start. This is my first class on proofs. Do I state:
$\frac{1}{n}=a_n=a_1a_2...a_nb_1b_2...b_n$ with $b$ referring to the repeating part of the expression. I've looked at several other examples but am more confused than aided. I'm unsure how to prove the $n-1$ part. Any help would be appreciated.
Clearly, it suffices to take $n$ such that $n$ is co-prime with $10$. This is because the periods of $\frac{1}{5k},\frac{1}{2k}$ and $\frac{1}{k}$ are all the same.
So suppose $n>1$ is an integer coprime to $n$.
The period of $n$ is equal to the smallest positive integer $a$ such that $10^a-1$ is a multiple of $n$ (because each of the blocks in the expansion of $\frac{1}{n}$ must yield a sequence of nines when multiplied by $n$).
Notice that $n$ divides $10^{\varphi(a)}-1$. Since $\varphi(a)\leq a-1$ we are done.
Notice that equality holds if and only if $n$ is primes and $10$ is a primitive root $\bmod n$.