OFFSET
2,7
COMMENTS
The number of terms associated with a particular value of b are cyclical: 4, 4, 2, 1, 1, repeat. This is because the values are associated with b (mod 5), starting with 2 (mod 5).
The expansion of 1/5 either terminates after one digit when b == 0 (mod 5) or is purely recurrent in all other cases of b (mod 5), since 5 is prime and must either divide or be coprime to b.
The period for purely recurrent expansions of 1/5 must be a divisor of Euler's totient of 5 = 4, i.e., one of {1, 2, 4}.
b == 0 (mod 5): 1 (terminating)
b == 1 (mod 5): 1 (purely recurrent)
b == 2 (mod 5): 4 (purely recurrent)
b == 3 (mod 5): 4 (purely recurrent)
b == 4 (mod 5): 2 (purely recurrent)
The expansion of 1/5 has a full-length period 4 when base b is a primitive root of p = 5.
Digits of 1/5 for the following bases:
2 0, 0, 1, 1
3 0, 1, 2, 1
4 0, 3
5* 1
6 1
7 1, 2, 5, 4
8 1, 4, 6, 3
9 1, 7
10* 2
11 2
12 2, 4, 9, 7
13 2, 7, 10, 5
14 2, 11
15* 3
16 3
17 3, 6, 13, 10
18 3, 10, 14, 7
19 3, 15
20* 4
...
Asterisks above denote terminating expansion; all other entries are digits of purely recurrent reptends.
Each entry associated with base b with more than one term has a second term greater than the first except for b = 2, where the first two terms are 0, 0.
Entries for b == 0 (mod 5) (i.e., integer multiples of 5) appear at 11, 23, 35, ..., every 12th term thereafter.
REFERENCES
U. Dudley, Elementary Number Theory, 2nd ed., Dover, 2008, pp. 119-126.
G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 6th ed., Oxford Univ. Press, 2008, pp. 138-148.
Oystein Ore, Number Theory and Its History, Dover, 1988, pp. 311-325.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 2..10000
Eric Weisstein's World of Mathematics, Decimal Period.
Eric Weisstein's World of Mathematics, Repeating Decimal.
FORMULA
Conjectures from Colin Barker, Oct 09 2015: (Start)
a(n) = 2*a(n-12) - a(n-24) for n>24.
G.f.: x^3*(x^19 +x^18 +x^17 +2*x^16 +2*x^15 +x^14 +2*x^13 +3*x^12 +2*x^11 +x^10 +x^9 +x^8 +3*x^7 +x^5 +2*x^4 +x^3 +x +1) / (x^24 -2*x^12 +1).
(End)
EXAMPLE
For b = 8, 1/5 = .14631463..., thus 1, 4, 6, 3 are terms in the sequence.
For b = 10, 1/5 = .2, thus 2 is a term in the sequence.
For b = 13, 1/5 = .27a527a5..., thus 2, 7, 10, 5 are terms in the sequence.
MATHEMATICA
RotateLeft[Most@ #, Last@ #] &@ Flatten@ RealDigits[1/5, #] & /@ Range[2, 38] // Flatten (* Michael De Vlieger, Sep 11 2015 *)
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Michael De Vlieger, Sep 11 2015
STATUS
approved