4
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Since we can't repeat until we hit the same remainder, it's feasible that the more remainders are possible, the longer we can go before repeating. I'd try large two digit primes (not sure why prime, but I have $1/7$ in mind) for the denominator, like 97. $\endgroup$ – pjs36 Jan 5 '17 at 5:02
  • 3
    $\begingroup$ See here also: en.m.wikipedia.org/wiki/Repeating_decimal $\endgroup$ – Rohan Jan 5 '17 at 5:09
8
$\begingroup$

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}$

$\endgroup$
  • 1
    $\begingroup$ Since 97 is prime, the numerator has no affect on the period length (barring the trivial cases 0 and 97). $\endgroup$ – Gerry Myerson Jan 5 '17 at 6:11
  • $\begingroup$ @GerryMyerson: true, but it can have an effect on the period length if it were not prime. I wanted to claim that for $98$ and $99$ as well I could just look at $\frac 1{98}$ and $\frac 1{99}$ even though they are not prime. $\endgroup$ – Ross Millikan Jan 5 '17 at 6:16
  • $\begingroup$ Yes, Ross, I'm happy with your handling of 98 and 99. I just didn't want anyone to form the mistaken impression that 1/97 was the only case with period 96. $\endgroup$ – Gerry Myerson Jan 5 '17 at 6:19
  • $\begingroup$ @RossMillikan OK, that makes sense. So would the same be applied to 3 digit numbers? Would $\frac{1}{997}$ be the largest repeating decimal created by two natural numbers no more than 3 digits? $\endgroup$ – MathGuy Jan 5 '17 at 14:09
  • $\begingroup$ No, because the period of $1/997$ is $166$, not $996$, so you should keep looking down the list of primes. What is going on is that the numbers coprime to $n$ form a multiplicative group. It may or may not be that $10$ is a generator of the whole group, which means you can represent all the elements as $10^k$. The first time this fails is $13$, where the powers of $10$ are $10,9,12,3,4,1$ and the period of $1/13$ is $6$, not $12$. $\endgroup$ – Ross Millikan Jan 5 '17 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.