## Application: Decimal expansions of rational numbers

Let be a sequence of integers. We call the sequence eventually periodic if there is an and a such that , for all . The smallest for which this holds if called the period of the sequence.

It is well-known that a real number is rational if and only if it is eventually periodic.

Lemma 1.8.6   A real number has an eventually periodic decimal expansion if and only if it is a rational number, .

proof: Let

denote the decimal expansion of . We shall call each or a digit in the expansion. One direction is very easy. Using the geometric series expansion is is easy to see that if the expansion of is eventually periodic then . The converse is less trivial. It suffices to consider the case , since adding or subtracting an integer won't affect whether or not the expansion is eventually periodic. Let , where are relatively prime integers. If then , where , , and . Note that is eventually periodic if and only if is eventually periodic, where . Therefore, after possibly replacing by , we may assume without loss of generality that . By Euler's theorem, if we know that there is a such that (indeed, we may take and the smallest possible such must divide , where is Euler's totient function). If then we may write

Since , the number of non-zero digits in the decimal expansion of is at most . Therefore has a periodic decimal expansion.

First, to illustrate the ideas in a simpler setting, let us consider the special case of the expansion of the number , prime not equal to or to . By the above proof, we know that if is any integer satisfying then is periodic with period . However, this period may not be the smallest possible period (remember, a sequence of integers which repeats every times will also repeat every times, for instance). We are naturally lead to the following concept (one which also occurs later in the study of group theory as well).

The above proof implies that the following result holds.

Lemma 1.8.7   Let be the order of modulo (in other words, suppose , 's in a row, and is smallest possible). Then is periodic with period and there is no smaller period.

Example 1.8.8 (1)   Fermat's little theorem gives . The order of modulo is , so is period .

(2) Fermat's little theorem gives . The order of modulo is , so is period .

(3) Fermat's little theorem gives . The order of modulo is , so is period .

(4) Fermat's little theorem gives . The order of modulo is , so is period .

This raises the question: When is the period of as long as possible (i.e., )? We shall call such a prime a full period prime. A curiosity about full-period primes: if the prime is , the period is p-1, so look at the first and last digits in the expansion of . Those two -digit numbers add up to .

Example 1.8.9 (a)   is .142 857 142 857 ... and .

(b) is 0.04347826086 95652173913 043... and

We are naturally lead to the following concept (one which also occurs later under a different name in the study of cyclic groups).

Definition 1.8.10   Let be a prime. We say that is a primitive root modulo if the smallest satisfying is .

Thus the question When is the period of as long as possible?'' becomes For which primes is a primitive root mod ?" To our knowledge, there does not seem to be a simple answer to this question. Artin conjectured in the 1920s the following statement.

Conjecture 1.8.11 (Artin)   Every positive integer is the primitive root of for infinitely many primes .

So that means that should be the primitive root for infinitely many primes , so there should be infinitely many full-period primes. Quantitatively, the conjecture boils down to of all primes asymptotically have as primitive root (the is really an approximation to Artin's constant; it's ). Although many people have tried, Artin's conjecture is not yet proven.

david joyner 2008-04-20