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?

  • 1
    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.2017-01-05
  • 3
    See here also: https://en.m.wikipedia.org/wiki/Repeating_decimal2017-01-05

1 Answers 1

8

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

  • 1
    Since 97 is prime, the numerator has no affect on the period length (barring the trivial cases 0 and 97).2017-01-05
  • 0
    @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.2017-01-05
  • 0
    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.2017-01-05
  • 0
    @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?2017-01-05
  • 0
    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$.2017-01-05