A262115 Irregular triangle read by rows: row b (b >= 2) gives periodic part of digits of the base-b expansion of 1/7.
0, 0, 1, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 3, 2, 4, 1, 2, 0, 5, 1, 1, 1, 2, 5, 1, 4, 2, 8, 5, 7, 1, 6, 3, 1, 8, 6, 10, 3, 5, 1, 11, 2, 2, 2, 4, 9, 2, 7, 4, 14, 9, 12, 2, 10, 5, 2, 13, 10, 16, 5, 8, 2, 17, 3, 3, 3, 6, 13, 3, 10, 6, 20, 13, 17, 3, 14, 7, 3, 18, 14, 22, 7, 11, 3, 23, 4, 4, 4, 8, 17
Offset: 2
Examples
For b = 8, 1/7 = .111..., contributing the term 1 to the sequence. For b = 9, 1/7 = .125125..., thus 1, 2, 5 are the next terms in the sequence. For b = 10, 1/7 = .142857142857..., thus 1, 4, 2, 8, 5, 7 are terms that follow in the sequence.
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.
Crossrefs
Programs
-
Maple
F:= proc(N) # to get rows for bases 2 to N, flattened. local b, R, p, L; R:= NULL; for b from 2 to N do if b mod 7 = 0 then R:= R, b/7 else p:= numtheory:-order(b, 7); L:= convert((b^p-1)/7, base, b); if nops(L) < p then L:= [op(L), 0$ (p - nops(L))] fi; R:= R, op(ListTools:-Reverse(L)); fi od: R; end proc: F(100); # Robert Israel, Dec 04 2015
-
Mathematica
RotateLeft[Most@ #, Last@ #] &@ Flatten@ RealDigits[1/7, #] & /@ Range[2, 30] // Flatten (* Michael De Vlieger, Sep 11 2015 *)
Formula
Conjectures from Colin Barker, Oct 09 2015: (Start)
a(n) = 2*a(n-22) - a(n-44) for n>44.
G.f.: x^3*(x^39 +x^38 +x^37 +x^36 +2*x^35 +2*x^34 +2*x^33 +x^32 +x^31 +2*x^30 +x^29 +3*x^28 +3*x^27 +4*x^26 +2*x^25 +2*x^24 +x^23 +3*x^22 +2*x^21 +x^20 +x^19 +x^18 +5*x^17 +2*x^15 +x^14 +4*x^13 +2*x^12 +3*x^11 +x^9 +2*x^8 +2*x^6 +x^5 +2*x^4 +x^2 +1) / (x^44 -2*x^22 +1).
(End)
From Robert Israel, Dec 04 2015: (Start)
To prove the recursion, note that if a(n) is the k'th digit in the base-b expansion of 1/7, then a(n+22) and a(n+44) are the corresponding digits in the base-(b+7) and base-(b+14) expansions.
The one digit in the base-(7k) expansion of 1/7 is k.
For each d from 1 to 6, one can show that the digits in the base-(7k+d) expansion of ((7k+d)^p - 1)/7 where p is the order of d mod 7, and thus the digits of 1/7, are linear expressions in k.
Thus for d=3, these digits are [5k+2, 4k+1, 6k+2, 2k, 3k+1, k], since those are nonnegative integers < 7k+3 and (5k+2) + (4k+1)*(7k+3) + (6k+2)*(7k+3)^2 + (2k)*(7k+3)^3 + (3k+1)*(7k+3)^4 + k*(7k+3)^5 = ((7*k+3)^6 - 1)/7.
The g.f. follows from the recursion. (End)
Comments