The number of bases in which is a repeating decimal (actually, repeating b-ary) of length l is the same as the number of fractions
,
,
which have reduced denominator l. For example, in bases 2, 3, ..., 6, 1/7 is given by
![]() |
![]() |
![]() |
|
![]() |
![]() |
||
![]() |
![]() |
||
![]() |
![]() |
||
![]() |
![]() |
which have periods 3, 6, 3, 6, and 2, respectively, corresponding to the denominators 6, 3, 2, 3, and 6 of

Cyclic Number, Repeating Decimal, Totient Function