142857, and more numbers like it

John Kerl

January 4, 2012

Abstract

These are brief jottings to myself on vacation-spare-time observations about transposable numbers. Namely, 1/7 in base 10 is 0.\overline{142857}, 2/7 is 0.\overline{285714}, 3/7 is 0.\overline{428571}, and so on. That’s neat — can we find more such? What happens when we use denominators other than 7, or bases other than 10?

The results presented here are generally ancient and not essentially original in their particulars. The current exposition takes a particular narrative and data-driven approach; also, elementary group-theoretic proofs preferred when possible.

As much I’d like to keep the presentation here as elementary as possible, it makes the presentation far shorter to assume some first-few-weeks-of-the-semester group theory Since my purpose here is to quickly jot down some observations, I won’t develop those concepts in this note. This saves many pages, at the cost of some accessibility, and with accompanying unevenness of tone.

Contents

1 The number 142857, and some notation  3

2 Questions  4
2.1 Are certain constructions possible? . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 What periods can exist? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 When can full periods exist? . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 How do digit sets correspond to numerators? . . . . . . . . . . . . . . . . . . 5
2.5 What’s the relationship between add order and shift order? . . . . . . . . . . 5
2.6 Why are half-period shifts special? . . . . . . . . . . . . . . . . . . . . . . . 6

3 Findings  6
3.1 Relationship between expansions and integers . . . . . . . . . . . . . . . . . 6
3.2 Period is independent of numerator . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Are certain constructions possible? . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 What periods can exist? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.5 When can full periods exist? . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.6 How do digit sets correspond to numerators? . . . . . . . . . . . . . . . . . . 8
3.7 What’s the relationship between add order and shift order? . . . . . . . . . . 8
3.8 Why are half-period shifts special? . . . . . . . . . . . . . . . . . . . . . . . 9
4 Data for periods  11
5 Repeating-fraction data  12
5.1 Repeating-fraction data for n = 7 . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2 Repeating-fraction data for n = 9 . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3 Repeating-fraction data for n = 11 . . . . . . . . . . . . . . . . . . . . . . . 14
5.4 Repeating-fraction data for n = 13 . . . . . . . . . . . . . . . . . . . . . . . 15
5.5 Repeating-fraction data for n = 21 . . . . . . . . . . . . . . . . . . . . . . . 16
5.6 Repeating-fraction data for n = 27 . . . . . . . . . . . . . . . . . . . . . . . 17
6 References  18

1 The number 142857, and some notation

Decimal expansions of sevenths are particularly appealing. As soon as we learn to do long division we can find:

\begin{aligned}1/7 & = & 0.\overline{142857} \\ 2/7 & = & 0.\overline{285714} \\ 3/7 & = & 0.\overline{428571} \\ 4/7 & = & 0.\overline{571428} \\ 5/7 & = & 0.\overline{714285} \\ 6/7 & = & 0.\overline{857142} \end{aligned}

The repeating part, 142857, shows up cyclically shifted. (See also the Wikipedia articles on 142857, Cyclic number, and Transposable integer.) If we instead start with 142857, then cyclically left-shift by a digit to get 428571, and so on, we get

\begin{aligned}1/7 & = & 0.\overline{142857} \\ 3/7 & = & 0.\overline{428571} \\ 2/7 & = & 0.\overline{285714} \\ 6/7 & = & 0.\overline{857142} \\ 4/7 & = & 0.\overline{571428} \\ 5/7 & = & 0.\overline{714285} \end{aligned}

Is this ordering 1, 3, 2, 6, 4, 5 of the numerators random, or is there some sense to it?

Seeking around for other fractions like this, we find numbers such as 1/13 and its multiples:

Written in add-order Written in shift-order
1/13 = 0.\overline{076923} 1/13 = 0.\overline{076923}
2/13 = 0.\overline{153846} 10/13 = 0.\overline{769230}
3/13 = 0.\overline{230769} 9/13 = 0.\overline{692307}
4/13 = 0.\overline{307692} 12/13 = 0.\overline{923076}
5/13 = 0.\overline{384615} 3/13 = 0.\overline{230769}
6/13 = 0.\overline{461538} 4/13 = 0.\overline{307692}
7/13 = 0.\overline{538461}
8/13 = 0.\overline{615384} 2/13 = 0.\overline{153846}
9/13 = 0.\overline{692307} 7/13 = 0.\overline{538461}
10/13 = 0.\overline{769230} 5/13 = 0.\overline{384615}
11/13 = 0.\overline{846153} 11/13 = 0.\overline{846153}
12/13 = 0.\overline{923076} 6/13 = 0.\overline{461538}
8/13 = 0.\overline{615384}

Here, we have not the one number 142857, but the two numbers 076923 and 153846. Why two, instead of, say, a single 12-digit number? (See also section 5 for more data.)

In order to ask and address these questions and others like them, I use the following terminology and notation:

• Generalizing from 1/7, …, 6/7 in base 10, I refer to numerator k, denominator n, and base b.

• For b < 10, I use the base-b digits 0, 1, 2, …, b − 1: e.g. 0, 1, 2, 3, 4, 5, 6 for base 7. For b > 10, as is standard, I use include a, b, c, … for 10, 11, 12, …. E.g. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f for base 16.

• I only consider k’s between 0 and n, and relatively prime (which means the same as coprime) to n. (E.g. I’ll only look at 1/9, 2/9, 4/9, 5/9, 7/9, 8/9.) This is because k’s non-coprime to k represent simpler fractions (e.g. 3/9 = 1/3), and because I find empirically that these simplifiable fractions don’t share the same digit sets as the nonsimplifiable ones. (For example, 1/9, 2/9, 4/9, 5/9, 7/9, 8/9 in base 16 are 0.\overline{1c7}, 0.\overline{38e}, 0.\overline{71c}, 0.\overline{8e3}, 0.\overline{c71}, 0.\overline{e38}, whereas 3/9 and 6/9 are 0.\overline{5} end 0.\overline{a} respectively.)

• The number of repeating digits in the expansion of k/n is called the period. It depends on n and b, so I write p = p(n, b). It needs to be shown that this doesn’t depend on k, that is, for all k’s coprime to n, the period is the same.

• It turns out that the longest possible period for the k/n, in any base b, is ϕ(n) where ϕ(n) is the Euler totient function of n. That is, ϕ(n) is the number of k’s between 0 and n that are coprime with n. (E.g. ϕ(7) = 6 since 1, 2, 3, 4, 5, 6 are coprime to 7; ϕ(9) is also 6 since 1, 2, 4, 5, 7, 8 are coprime to 9.) When k/n’s have period ϕ(n) in base b, I say they have full period.

2 Questions

Having set the stage, I can now pose several questions.

2.1 Are certain constructions possible?

Here’s the original question I recently posed to myself. It seems interesting that the digits 1, 2, 4, 5, 7, 8 in the base-10 expansion of k/7 are precisely the six numbers between 0 and 9 which are relatively prime to 9. In hexadecimal, can I find a denominator n such that fractions k/n written out in hexadecimal have digits 1, 2, 4, 7, 8, b, d, e in some order (since these are the eight digits relatively prime to 15)? If so, what order do those digits go in? If on the other hand I can’t find any such n, then why not?

(Findings are in section 3.3.)

2.2 What periods can exist?

Question (i): When I write down 1/7, …, 6/7 in other bases besides 10, will they all have period 6? If not, then what? More generally: holding denominator n fixed and varying b, what periods can exist?

Question (ii): Why do there seem to be no periods of 8 in base 16 (section 4)? More generally: holding base b fixed varying n, what periods can exist?

(Findings are in section 3.4.)

2.3 When can full periods exist?

Can I find more numbers like 142857? That is, when do k/n’s have the longest possible period in base-b expansion, with digits for each fraction being cyclic permutations of one another?

(Findings are in section 3.5.)

2.4 How do digit sets correspond to numerators?

When k/n’s have a less-than-longest-possible period in base-b expansion, how do the digit sets relate to k’s? (E.g. why is it that 1/13 and 3/13 are shifts of 076923, while 2/13 and 5/13 are shifts of 153846?)

(Findings are in section 3.6.)

2.5 What’s the relationship between add order and shift order?

What’s the connection between writing down 1/7, 2/7, 3/7, 4/7, 5/7, 6/7 (add order in the table above) and 1/7, 3/7, 2/7, 6/7, 4/7, 5/7 (shift order in the table above)? Is there some mathematical way to find out what the shift order is going to be?

(Findings are in section 3.7.)

2.6 Why are half-period shifts special?

From the expansions of 1/7 and 1/13 we note that when we split the numbers 142857, 076923, and 153846 right down the middle, the digits are related in a very particular way: 142 + 857 = 999, 076 + 923 = 999, and 153 + 846 = 999. Why is this? Does this hold true for other n’s and b’s?

(Findings are in section 3.8.)

3 Findings

3.1 Relationship between expansions and integers

First we need some elaboration on how to work with periods of base-b expansions. Remark 3.1. It is well-known that, regardless of base b, the expansions of fractions of integers either eventually terminate or eventually repeat. To see the connection between base-b expansions and integers, let’s start by example. Eventually-terminating expansions aren’t of interest in this note; for eventually repeating expansions, we can find the period p of the repetition and multiply by 10^{p}, then subtract. E.g. We can see that 1/7 in base 10 has period 6. So

  x=1/7
  1000000x = 142857.142857142857...
         x =      0.142857142857...
  ----------------------------------
   999999x = 142857
   1/7     = 142857/999999

Saying that 1/7 repeats every 6 decimal places is the same as saying that 7 divides evenly into 999999 = 10^{6} − 1. More generally, the period p is the smallest positive integer e such that n divides b^{e} − 1, i.e. b^{e} − 1 ≡ 0 (mod n), i.e. b^{e} ≡ 1 (mod n). This means p is nothing other than the group-theoretic period of b mod n.

For example, with n = 7 and b = 10 ≡ 3 (mod 7), 3 is primitive mod 7 since its powers mod 7 are 3, 2, 6, 4, 5, 1. With n = 7 and b = 16 ≡ 2 (mod 7), 2 is imprimitive mod 7 since its powers mod 7 are 2, 4, 1.

3.2 Period is independent of numerator

Proposition 3.2. For 0 < k < n and k coprime to n, the period of k/n in base b is independent of k.

Proof. Let p_{1} be the period of 1/n in base b. Let 1 < k < n and (k, n) = 1; let p_{k} be the period of k/n in base b. It needs to be shown that p_{k} = p_{1}.

Since (k, n) = 1, there exists a such that ak ≡ 1 (mod n) (this is the reciprocal of k mod n). Then p_{a} = p_{1}, since a/n − 1/n is an integer. When we multiply each p_{k}-digit block by a and do the carries, we get other blocks of p_{k} digits (or shorter). The same is true for obtaining the p_{k}-digit blocks from the p_{1}-digit blocks. This means p_{a} ≤ p_{k} ≤ p_{1}. Since p_{a} = p_{1}, we have sandwiched p_{k} = p_{1}.

3.3 Are certain constructions possible?

(See section 2.1 for the statement of the question.)

It seems interesting that the digits 1, 2, 4, 5, 7, 8 in the decimal expansion of 1/7 are precisely the six numbers between 0 and 9 which are relatively prime to 9. Can I find a denominator n such that fractions k/n written out in hexadecimal have digits 1, 2, 4, 7, 8, b, d, e in some order (since these are the eight digits relatively prime to 15)? If so, what order do they go in? If on the other hand I can’t find any such denominator, then why not?

Proposition 3.3. There exist no full-period base-b expansions for any denominator n whenever xxx, or whenever b is a perfect square.

Remark 3.4. xxx These are sufficient but not necessary ... xxx find another example.

Proof. xxx no, since from 1a. b is square and non-trivial unit groups (needs xref ...) have even order.

3.4 What periods can exist?

(See section 2.2 for the statement of the question.)

Question (i): Fixing denominator n, varying b, what periods can exist?

Proposition 3.5. The period p(n, b) of k/n’s, with k coprime to n, divides ϕ(n).

Proof. It was shown in remark 3.1 that p(n, b) is the group-theoretic period of b mod n. From Fermat’s little theorem we know that the order of ⟨b⟩ divides |(ℤ/nℤ)^{×}|, which is ϕ(n).

For examples, see section 4.

Question (ii): Fixing b, varying n, what periods can exist? In particular, why do there seem to be no periods of 8 in base 16?

xxx xref to the above. Maybe reorder.

3.5 When can full periods exist?

(See section 2.3 for the statement of the question.)

xxx When do k/n’s have the longest possible period in base-b expansion, with digits for each fraction being cyclic permutations of one another?

Note: full period iff (?) b is primitive mod n (which in turn requires that n’s unit group be cyclic – cf. n=21).

When that does occur, what properties do those ϕ(n) digits (the digit set of n and b) have?

xxx none that i can tell ... 142857 being the unit group of 9 appears to be a coincidence ... :/

3.6 How do digit sets correspond to numerators?

(See section 2.4 for the statement of the question.)

xxx When k/n’s have a less-than-longest-possible period in base-b expansion, how do the digit sets relate to k’s? (E.g. why is it that 1/13 and 3/13 are shifts of one another, using 076923, while 2/13 and 5/13 are shifts of 153846?)

xxx mapping to partitions are cosets of ⟨b⟩ > mod n (orbit and co-orbits).

3.7 What’s the relationship between add order and shift order?

(See section 2.5 for the statement of the question.)

From section 3.1 we saw that base-b expansions of period p could be identified with integer arithmetic mod b^{p} − 1. The key point is that a single left-cyclic shift is nothing more than multiplication by b mod b^{p} −1. For example, multiply 142857 by 10 to get 1428750. Moving the 1 right six places is the same as subtracting 1000000 and adding 1, i.e. subtracting off (a multiple of) 999999, i.e. reducing mod 999999. Also note that shifts by 1 are equivalent to multiplying by b mod n: 142857 · 3 ≡ 142857 · 10 (mod 999999) since 7 · 142857 = 999999.

We see this in the shift-order tables in sections 1 and 5. For n = 7, b = 10, b mod n is 3. The powers of 10 mod 7 are 3, 2, 6, 4, 5, 1 (3 is primitive mod 7). Likewise for n = 13, b = 10: b mod n is 10, which is the square of 6 mod 13 and therefore imprimitive mod 13. The powers of 10 mod 13 are 10, 9, 12, 3, 4, 1.

Here’s a side note: until we do base-b long division of 1/n we don’t know all the digits of the expansion of 1/n. But we do know (by the above ... xxx make it a prop / move it?) the period p. It turns out we also know the last digit of the expansion.

Proposition 3.6. Let m_{1} = (b^{p} − 1)/n. (These are the digits of 1/n in base b, e.g. for n = 7, b = 10, m_{1} = 142857.) Let t(m_{1}) be the least-significant digit of m_{1}. Then

t(m_{1}) · n ≡ −1 (mod b).

Proof. The first right-cyclic shift (in contrast to the left-cyclic shifts used elsewhere in this note) is

m_{2} = (m_{1} + t(m_{1}) · (b^{p} − 1))/b but m_{1} = (b^{p} − 1)/n so
m_{2} = (m_{1} + t(m_{1}) · n · m_{1})/b
m_{2} = (1 + t(m_{1}) · n) · m_{1}/b.

(For example, let n = 7, b = 10. Then p = 6. If m_{1} = 142857, then t(m_{1}) = 7, and then (142857 + 7 · 999999)/10 = (142857 + 7 · 999999)/10 = 714285.)

xxx fill in the missing step ... reduction mod b? b has to divide one term or the other?

This forces t(m_{1}) · n ≡ −1 (mod b).

For example, with n = 27, b = 10 we know two things: first, b has order 3 mod 27 since its powers are 10,100,1000 which are 10,19,1 mod 27. Second, from the theorem we know t(m_{1}) · 27 ≡ 9 (mod 10), that is, 1/27 in base 10 must end with a 7 (which it does: see 5.6 for this and other examples).

3.8 Why are half-period shifts special?

(See section 2.6 for the statement of the question.)

From the expansions of 1/7 and 1/13 we note that when we split the numbers 142857, 076923, and 153846 right down the middle, the digits are related: 142 + 857 = 999, 076 + 923 = 999, and 153+846 = 999. (Phrased differently, we have 142857+857142 = 999, 076923+923076 = 999, and 153846 + 846153 = 999.) Why is this?

This is called Midy’s theorem. Here’s a proof. xxx temp newpage

Theorem 3.7 (Midy’s theorem). Let n have period p in base b; let 0 < k < n with k coprime to n. Let m = b^{p} − 1. Lastly and most importantly, suppose that n is prime. Then (1 + b^{p/2})\frac{km}{n} ≡ 0 (mod m).

Remark 3.8. For example, let n = 7, b = 10, and k = 1. Then p = 6 and m = 999999. We have \frac{km}{n} = 142857. Since left-shift by one place is multiplication by b mod m (xxx xref), b^{p/2} · \frac{km}{n} = 142857000 ≡ 857142 (mod 999999).

Proof. We need to show that (1 + b^{p/2})\frac{k}{n} is an integer, in spite of the n in the denominator. Since we take k coprime to n, we need n to divide 1 + b^{p/2}, i.e. b^{p/2} ≡ −1 (mod n). But this is certainly the case: since p is the period of n in base b, p is the smallest positive exponent e such that b^{e} ≡ 1 (mod n). Since n is prime, b^{p/2} ≡ ±1 (mod n). But b^{p/2} ≢ 1 (mod n), since p/2 is not the period, so b^{p/2} ≡ −1 (mod n).

See the data in section 5 for examples. (Note that 21 isn’t prime. xxx sums of 666666 or 333333; 1000 ≡ 13 (mod 2)1 ….)

xxx also note this means these cyclics are multiples of b.

4 Data for periods

n b = 7 b = 8 b = 9 b = 10 b = 11 b = 12 b = 13 b = 14 b = 15 b = 16
2  1  1  1  1  1
3  1  2  1  2  1  2  1
4  2  1  2  1  2
5  4  4  2  1  4  4  2  1
6  1  2  1
7  1  3  6  3  6  2  1  3
8  2  1  2  2  2
9  3  2  1  6  3  6  3
10  4  2  1  4
11  10  10  5  2  1  10  5  5  5
12  2  2  1
13  12  4  3  6  12  2  1  12  3
14  3  3  2  1
15  4  4  2  4  2  1
16  2  2  4  4  2
17  16  8  8  16  16  16  4  16  8  2
18  3  6  3
19  3  6  9  18  3  6  18  18  18  9
20  4  2  2  4
21  2  6  6  2  3
22  10  5  10  5
23  22  11  11  22  22  11  11  22  22  11
24  2  2  2
25  4  20  10  5  20  20  10  5
26  12  3  12  12
27  9  6  3  18  9  18  9
28  3  6  2  2
29  7  28  14  28  28  4  14  28  28  7
30  4  2  4
31  15  5  15  15  30  30  30  15  10  5
32  4  4  8  8  2
33  10  10  2  10  10  5
34  16  8  16  4  8
35  4  6  3  12  4  3
36  6  6  3
37  9  12  9  3  6  9  36  12  36  9
38  3  9  3  18  18
39  12  4  6  12  2  3
40  4  2  2  4
41  40  20  4  5  40  40  40  8  40  5
42  6  2
43  6  14  21  21  7  42  21  21  21  7
44  10  5  10  10
45  12  4  6  12  6  3
46  22  11  22  11  22
47  23  23  23  46  46  23  46  23  46  23
48  2  4  4
49  7  21  42  21  42  14  7  21
50  4  10  5  20
51  16  8  16  16  4  16  2
52  12  3  12  12
53  26  52  26  13  26  52  13  52  13  13
54  9  18  9
55  20  20  10  4  20  10  5
56  3  6  2  2
57  3  6  18  6  18  18  9
58  7  14  28  14  28
59  29  58  29  58  58  29  58  58  29  29
60  4  2  4

5 Repeating-fraction data

• Repeating fractions are shown for denominators n, 7, 9, 11, 13, 21, 27 and bases b = 10, 12, 16.

• Numerators k shown are only those coprime to n.

• The expansions are listed in add order, i.e. by increasing k, as well as shift order, i.e. grouped by cosets, then by left-shift within cosets.

• By ϕ(n), I mean the Euler totient function.

• The period p(n, b) is the period of n in base b.

• For convenience I also show the ratio r = ϕ(n)/p(n, b). (This is the number of distinct digits sets for n and b.)

5.1 Repeating-fraction data for n = 7

n = 7, ϕ(n) = 6

b = 10, p = 6, r = 1 b = 12, p = 6, r = 1 b = 16, p = 3, r = 2
1/7 = .\overline{142857}  1/7 = .\overline{186a35}  1/7 = .\overline{249}  add order
2/7 = .\overline{285714}  2/7 = .\overline{35186a}  2/7 = .\overline{492}
3/7 = .\overline{428571}  3/7 = .\overline{5186a3}  3/7 = .\overline{6db}
4/7 = .\overline{571428}  4/7 = .\overline{6a3518}  4/7 = .\overline{924}
5/7 = .\overline{714285}  5/7 = .\overline{86a351}  5/7 = .\overline{b6d}
6/7 = .\overline{857142}  6/7 = .\overline{a35186}  6/7 = .\overline{db6}
1/7 = .\overline{142857}  1/7 = .\overline{186a35}  1/7 = .\overline{249}  shift order
3/7 = .\overline{428571}  5/7 = .\overline{86a351}  2/7 = .\overline{492}
2/7 = .\overline{285714}  4/7 = .\overline{6a3518}  4/7 = .\overline{924}

6/7 = .\overline{857142}

4/7 = .\overline{571428}  6/7 = .\overline{a35186}  3/7 = .\overline{6db}
5/7 = .\overline{714285}  2/7 = .\overline{35186a}  6/7 = .\overline{db6}
3/7 = .\overline{5186a3}  5/7 = .\overline{b6d}

5.2 Repeating-fraction data for n = 9

n = 9, ϕ(n) = 6

b = 10, p = 1, r = 6 b = 16, p = 3, r = 2
1/9 = .\overline{1}  1/9 = .\overline{1c7}  add order
2/9 = .\overline{2}  2/9 = .\overline{38e}
4/9 = .\overline{4}  4/9 = .\overline{71c}
5/9 = .\overline{5}  5/9 = .\overline{8e3}
7/9 = .\overline{7}  7/9 = .\overline{c71}
8/9 = .\overline{8}  8/9 = .\overline{e38}

1/9 = .\overline{1c7}  shift order

7/9 = .\overline{c71} 4/9 = .\overline{71c}

2/9 = .\overline{38e} 5/9 = .\overline{8e3} 8/9 = .\overline{e38}

n = 11, ϕ(n) = 10
b = 10, p = 2, r = 5 b = 12, p = 1, r = 10 b = 16, p = 5, r = 2
1/11 = .\overline{09}  1/11 = .\overline{1}  1/11 = .\overline{1745d}  add order
2/11 = .\overline{18}  2/11 = .\overline{2}  2/11 = .\overline{2e8ba}
3/11 = .\overline{27}  3/11 = .\overline{3}  3/11 = .\overline{45d17}
4/11 = .\overline{36}  4/11 = .\overline{4}  4/11 = .\overline{5d174}
5/11 = .\overline{45}  5/11 = .\overline{5}  5/11 = .\overline{745d1}
6/11 = .\overline{54}  6/11 = .\overline{6}  6/11 = .\overline{8ba2e}
7/11 = .\overline{63}  7/11 = .\overline{7}  7/11 = .\overline{a2e8b}
8/11 = .\overline{72}  8/11 = .\overline{8}  8/11 = .\overline{ba2e8}
9/11 = .\overline{81}  9/11 = .\overline{9}  9/11 = .\overline{d1745}
10/11 = .\overline{90}  10/11 = .\overline{a}  10/11 = .\overline{e8ba2}

1/11 = .\overline{09}  1/11 = .\overline{1}  1/11 = .\overline{1745d}  shift order
10/11 = .\overline{90}  2/11 = .\overline{2}  5/11 = .\overline{745d1}
3/11 = .\overline{3}  3/11 = .\overline{45d17}
2/11 = .\overline{18}  4/11 = .\overline{4}  4/11 = .\overline{5d174}
9/11 = .\overline{81}  5/11 = .\overline{5}  9/11 = .\overline{d1745}
6/11 = .\overline{6}
3/11 = .\overline{27}  7/11 = .\overline{7}  2/11 = .\overline{2e8ba}
8/11 = .\overline{72}  8/11 = .\overline{8}  10/11 = .\overline{e8ba2}
9/11 = .\overline{9}  6/11 = .\overline{8ba2e}
4/11 = .\overline{36} 10/11 = .\overline{a} 8/11 = .\overline{ba2e8}
7/11 = .\overline{63}  7/11 = .\overline{a2e8b}

5/11 = .\overline{45} 6/11 = .\overline{54}

n = 13, ϕ(n) = 12
b = 10, p = 6, r = 2 b = 12, p = 2, r = 6 b = 16, p = 3, r = 4
1/13 = .\overline{076923}  1/13 = .\overline{0b}  1/13 = .\overline{13b}  add order
2/13 = .\overline{153846}  2/13 = .\overline{1a}  2/13 = .\overline{276}
3/13 = .\overline{230769}  3/13 = .\overline{29}  3/13 = .\overline{3b1}
4/13 = .\overline{307692}  4/13 = .\overline{38}  4/13 = .\overline{4ec}
5/13 = .\overline{384615}  5/13 = .\overline{47}  5/13 = .\overline{627}
6/13 = .\overline{461538}  6/13 = .\overline{56}  6/13 = .\overline{762}
7/13 = .\overline{538461}  7/13 = .\overline{65}  7/13 = .\overline{89d}
8/13 = .\overline{615384}  8/13 = .\overline{74}  8/13 = .\overline{9d8}
9/13 = .\overline{692307}  9/13 = .\overline{83}  9/13 = .\overline{b13}
10/13 = .\overline{769230}  10/13 = .\overline{92}  10/13 = .\overline{c4e}
11/13 = .\overline{846153}  11/13 = .\overline{a1}  11/13 = .\overline{d89}
12/13 = .\overline{923076}  12/13 = .\overline{b0}  12/13 = .\overline{ec4}

1/13 = .\overline{076923}  1/13 = .\overline{0b}  1/13 = .\overline{13b}  shift order
10/13 = .\overline{769230}  12/13 = .\overline{b0}  3/13 = .\overline{3b1}
9/13 = .\overline{692307}  9/13 = .\overline{b13}
12/13 = .\overline{923076}  2/13 = .\overline{1a}
3/13 = .\overline{230769} 11/13 = .\overline{a1} 2/13 = .\overline{276}
4/13 = .\overline{307692}  6/13 = .\overline{762}
3/13 = .\overline{29}  5/13 = .\overline{627}
2/13 = .\overline{153846}  10/13 = .\overline{92}
7/13 = .\overline{538461}  4/13 = .\overline{4ec}
5/13 = .\overline{384615}  4/13 = .\overline{38}  12/13 = .\overline{ec4}
11/13 = .\overline{846153}  9/13 = .\overline{83}  10/13 = .\overline{c4e}

6/13 = .\overline{461538}

8/13 = .\overline{615384} 5/13 = .\overline{47} 7/13 = .\overline{89d}
8/13 = .\overline{74}  8/13 = .\overline{9d8}
11/13 = .\overline{d89}
6/13 = .\overline{56}
7/13 = .\overline{65}

n = 21, ϕ(n) = 12
b = 10, p = 6, r = 2 b = 16, p = 3, r = 4
1/21 = .\overline{047619}  1/21 = .\overline{0c3}  add order
2/21 = .\overline{095238}  2/21 = .\overline{186}
4/21 = .\overline{190476}  4/21 = .\overline{30c}
5/21 = .\overline{238095}  5/21 = .\overline{3cf}
8/21 = .\overline{380952}  8/21 = .\overline{618}
10/21 = .\overline{476190}  10/21 = .\overline{79e}
11/21 = .\overline{523809}  11/21 = .\overline{861}
13/21 = .\overline{619047}  13/21 = .\overline{9e7}
16/21 = .\overline{761904}  16/21 = .\overline{c30}
17/21 = .\overline{809523}  17/21 = .\overline{cf3}
19/21 = .\overline{904761}  19/21 = .\overline{e79}
20/21 = .\overline{952380}  20/21 = .\overline{f3c}

1/21 = .\overline{047619}  1/21 = .\overline{0c3}  shift order
10/21 = .\overline{476190}  16/21 = .\overline{c30}
16/21 = .\overline{761904}  4/21 = .\overline{30c}

13/21 = .\overline{619047}

4/21 = .\overline{190476}  2/21 = .\overline{186}
19/21 = .\overline{904761}  11/21 = .\overline{861}
8/21 = .\overline{618}

2/21 = .\overline{095238}

20/21 = .\overline{952380}  5/21 = .\overline{3cf}
11/21 = .\overline{523809}  17/21 = .\overline{cf3}
5/21 = .\overline{238095}  20/21 = .\overline{f3c}

8/21 = .\overline{380952}

17/21 = .\overline{809523}  10/21 = .\overline{79e}

13/21 = .\overline{9e7} 19/21 = .\overline{e79}

n = 27, ϕ(n) = 18
b = 10, p = 3, r = 6 b = 16, p = 9, r = 2 b = 10, p = 3, r = 6 b = 16, p = 9, r = 2
add order  shift order
1/27 = .\overline{037}  1/27 = .\overline{097b425ed}  1/27 = .\overline{037}  1/27 = .\overline{097b425ed}
2/27 = .\overline{074}  2/27 = .\overline{12f684bda}  10/27 = .\overline{370}  16/27 = .\overline{97b425ed0}
4/27 = .\overline{148}  4/27 = .\overline{25ed097b4}  19/27 = .\overline{703}  13/27 = .\overline{7b425ed09}
5/27 = .\overline{185}  5/27 = .\overline{2f684bda1}  19/27 = .\overline{b425ed097}
7/27 = .\overline{259}  7/27 = .\overline{425ed097b}  2/27 = .\overline{074}  7/27 = .\overline{425ed097b}
8/27 = .\overline{296}  8/27 = .\overline{4bda12f68}  20/27 = .\overline{740}  4/27 = .\overline{25ed097b4}
10/27 = .\overline{370}  10/27 = .\overline{5ed097b42}  11/27 = .\overline{407}  10/27 = .\overline{5ed097b42}
11/27 = .\overline{407}  11/27 = .\overline{684bda12f}  25/27 = .\overline{ed097b425}
13/27 = .\overline{481}  13/27 = .\overline{7b425ed09}  4/27 = .\overline{148}  22/27 = .\overline{d097b425e}
14/27 = .\overline{518}  14/27 = .\overline{84bda12f6}  13/27 = .\overline{481}
16/27 = .\overline{592}  16/27 = .\overline{97b425ed0}  22/27 = .\overline{814}  2/27 = .\overline{12f684bda}
17/27 = .\overline{629}  17/27 = .\overline{a12f684bd}  5/27 = .\overline{2f684bda1}
19/27 = .\overline{703}  19/27 = .\overline{b425ed097}  5/27 = .\overline{185}  26/27 = .\overline{f684bda12}
20/27 = .\overline{740}  20/27 = .\overline{bda12f684}  23/27 = .\overline{851}  11/27 = .\overline{684bda12f}
22/27 = .\overline{814}  22/27 = .\overline{d097b425e}  14/27 = .\overline{518}  14/27 = .\overline{84bda12f6}
23/27 = .\overline{851}  23/27 = .\overline{da12f684b}  8/27 = .\overline{4bda12f68}
25/27 = .\overline{925}  25/27 = .\overline{ed097b425}  7/27 = .\overline{259}  20/27 = .\overline{bda12f684}
26/27 = .\overline{962}  26/27 = .\overline{f684bda12}  16/27 = .\overline{592}  23/27 = .\overline{da12f684b}
25/27 = .\overline{925}  17/27 = .\overline{a12f684bd}
8/27 = .\overline{296}
26/27 = .\overline{962}
17/27 = .\overline{629}

6 References

• http://en.wikipedia.org/wiki/Cyclic number
• http://en.wikipedia.org/wiki/Transposable integer
• http://en.wikipedia.org/wiki/Repeating decimal
• http://en.wikipedia.org/wiki/Cyclic permutation of integer
• http://en.wikipedia.org/wiki/Parasitic number
• http://mathworld.wolfram.com/CyclicNumber.html
• http://en.wikipedia.org/wiki/Midy%27s Theorem
• http://mathworld.wolfram.com/MidysTheorem.html