Let have order modulo . Then the base expansion of has period of length . To see this, note that if , then
Note also that for any . Hence has period . Now suppose that is even. Since has order modulo , it follows that . Hence . This means that at their midpoints the two numbers and are mirror images of one another. This means that splitting midway into two equal parts and adding them gives , i.e., a string of ‘s in base . This is known as Midy’s theorem.
For example, with and we get , and . Split into two equal parts and , adding which gives
In general, if is any divisor of , then
and so splitting into equal parts and adding them will always give a multiple of .
Here is an expository write-up of this post.
The number is interesting because of the following property
and . The last equation means that
So multiplying by simply permutes the digits of . As elements of these permutations correspond to (using cycle notation)
, , , , ,
respectively. We can read off the following from this list.
In general, if is an odd prime and is a positive integer with order modulo , then will have period of length in base . This follows simply from observing that if then
Now let be a primitive root modulo . We shall work in base . Then will have period of length . Since the periods of are , all of length , which are all powers of some permutation of the digits of , and no two of which are congruent modulo , it follows that the digits of are all distinct. So we’ve shown the following.
Theorem. If is an odd prime and is a primitive root modulo , then the base expansion of has period of length with distinct digits.
Taking , gives our previous example. So the prime in base is indeed very special, since it is the only prime less than for which is a primitive root.
Let and be integers. Consider the ring
This is a well-ordered group. So by a result in this post it is infinite cyclic. We call the positive generator the greatest common divisor (GCD) of and .
Consider now the ring
is divisible by both and .
It is also a well-ordered group. Hence it is generated by a single positive element , called the least common multiple (LCM) of and .
, and are subings of . Moreover, and . So by the Chinese remainder theorem,
which can be written as
by the third isomorphism theorem. The groups in brackets are all finite groups of orders , , and . Hence , i.e.,
In general, let . As before, we can define
is divisible by
Then and . As before,
So , i.e.
If we replace by for any number field , then takes the form
Taking cardinalities gives the following equation in terms of ideal norms