TITLE: What is the longest terminating (or repeating) decimal created by the division of two natural numbers in which neither number is more than two digits?
QUESTION [5 upvotes]: I came across a problem today while teaching in which a long division problem created an unusually long terminating decimal.  It intrigued me into more thinking on this.
My question is: What is the longest terminating (or repeating) decimal created by the division of two natural numbers in which neither number is more than two digits?  And, is there a way to prove this besides using brute force in trying all possibilities?

REPLY [8 votes]: The number of digits in the repeat of $\frac 1n$ (larger numerators can only decrease the number of digits) is always a factor of $\phi (n)$, Euler's totient function, the number of numbers less than and coprime to $n$.  For primes, $\phi(n)=n-1$, so pjs36's intuition to try large primes is a good one.  Once we discover $\frac 1{97}$ has a repeat of $96$ digits, we only need to find that $\phi(98)=42$ and $\phi(99)=60$ and we are done.  In fact, the repeat of $\frac 1{98}$ is $42$ decimals, but $\frac 1{99}=0.\overline{01}$