login
Irregular triangle read by rows: row b (b >= 2) gives periodic part of digits of the base-b expansion of 1/7.
2

%I #27 Jan 17 2018 16:43:33

%S 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,

%T 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,

%U 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

%N Irregular triangle read by rows: row b (b >= 2) gives periodic part of digits of the base-b expansion of 1/7.

%C The number of terms associated with a particular value of b are cyclical: 3, 5, 3, 5, 2, 1, 1, repeat. This is because the values are associated with b (mod 7), starting with 2 (mod 7).

%C The expansion of 1/7 either terminates after one digit when b == 0 (mod 7) or is purely recurrent in all other cases of b (mod 7), since 7 is prime and must either divide or be coprime to b.

%C The period for purely recurrent expansions of 1/7 must be a divisor of Euler's totient of 7 = 6, i.e., one of {1, 2, 3, 6}.

%C b == 0 (mod 7): 1 (terminating)

%C b == 1 (mod 7): 1 (purely recurrent)

%C b == 2 (mod 7): 3 (purely recurrent)

%C b == 3 (mod 7): 6 (purely recurrent)

%C b == 4 (mod 7): 3 (purely recurrent)

%C b == 5 (mod 7): 6 (purely recurrent)

%C b == 6 (mod 7): 2 (purely recurrent)

%C The expansion of 1/7 has a full-length period 6 when base b is a primitive root of p = 7.

%C Digits of 1/7 for the following bases:

%C 2 0, 0, 1

%C 3 0, 1, 0, 2, 1, 2

%C 4 0, 2, 1

%C 5 0, 3, 2, 4, 1, 2

%C 6 0, 5

%C 7* 1

%C 8 1

%C 9 1, 2, 5

%C 10 1, 4, 2, 8, 5, 7

%C 11 1, 6, 3

%C 12 1, 8, 6, 10, 3, 5

%C 13 1, 11

%C 14* 2

%C 15 2

%C 16 2, 4, 9

%C 17 2, 7, 4, 14, 9, 12

%C 18 2, 10, 5

%C 19 2, 13, 10, 16, 5, 8

%C 20 2, 17

%C 21* 3

%C ...

%C Asterisks above denote terminating expansion; all other entries are digits of purely recurrent reptends.

%C 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.

%C Entries for b == 0 (mod 7) (i.e., integer multiples of 7) appear at 21, 43, 65, ..., every 22nd term thereafter.

%D U. Dudley, Elementary Number Theory, 2nd ed., Dover, 2008, pp. 119-126.

%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 6th ed., Oxford Univ. Press, 2008, pp. 138-148.

%D Oystein Ore, Number Theory and Its History, Dover, 1988, pp. 311-325.

%H Michael De Vlieger, <a href="/A262115/b262115.txt">Table of n, a(n) for n = 2..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DecimalPeriod.html">Decimal Period</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RepeatingDecimal.html">Repeating Decimal</a>.

%F Conjectures from _Colin Barker_, Oct 09 2015: (Start)

%F a(n) = 2*a(n-22) - a(n-44) for n>44.

%F 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).

%F (End)

%F From _Robert Israel_, Dec 04 2015: (Start)

%F 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.

%F The one digit in the base-(7k) expansion of 1/7 is k.

%F 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.

%F 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.

%F The g.f. follows from the recursion. (End)

%e For b = 8, 1/7 = .111..., contributing the term 1 to the sequence.

%e For b = 9, 1/7 = .125125..., thus 1, 2, 5 are the next terms in the sequence.

%e For b = 10, 1/7 = .142857142857..., thus 1, 4, 2, 8, 5, 7 are terms that follow in the sequence.

%p F:= proc(N) # to get rows for bases 2 to N, flattened.

%p local b, R, p, L;

%p R:= NULL;

%p for b from 2 to N do

%p if b mod 7 = 0 then

%p R:= R, b/7

%p else

%p p:= numtheory:-order(b, 7);

%p L:= convert((b^p-1)/7, base, b);

%p if nops(L) < p then L:= [op(L), 0$ (p - nops(L))] fi;

%p R:= R, op(ListTools:-Reverse(L));

%p fi

%p od:

%p R;

%p end proc:

%p F(100); # _Robert Israel_, Dec 04 2015

%t RotateLeft[Most@ #, Last@ #] &@ Flatten@ RealDigits[1/7, #] & /@ Range[2, 30] // Flatten (* _Michael De Vlieger_, Sep 11 2015 *)

%Y Cf. A004526 Digits of expansions of 1/2.

%Y Cf. A026741 Full reptends of 1/3.

%Y Cf. A130845 Digits of expansions of 1/3 (eliding first 2 terms).

%Y Cf. A262114 Digits of expansions of 1/5.

%K nonn,base,tabf,easy

%O 2,7

%A _Michael De Vlieger_, Sep 11 2015