login
A037608
Base 8 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,3.
1
1, 10, 83, 665, 5322, 42579, 340633, 2725066, 21800531, 174404249, 1395233994, 11161871955, 89294975641, 714359805130, 5714878441043, 45719027528345, 365752220226762, 2926017761814099, 23408142094512793, 187265136756102346, 1498121094048818771
OFFSET
1,2
FORMULA
a(n) = 8*a(n-1)+a(n-3)-8*a(n-4). - Colin Barker, Nov 28 2014
G.f.: x*(3*x^2+2*x+1) / ((x-1)*(8*x-1)*(x^2+x+1)). - Colin Barker, Nov 28 2014
EXAMPLE
1, 10, 83, 665, 5322, ... in base 8 are 1, 12, 123, 1231, 12312, ...
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {1, 2, 3}], 8], {n, 30}] (* Harvey P. Dale, Apr 06 2022 *)
PROG
(PARI) Vec(x*(3*x^2+2*x+1)/((x-1)*(8*x-1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 28 2014
CROSSREFS
Cf. A037610.
Sequence in context: A116879 A154340 A037699 * A055149 A014831 A048440
KEYWORD
nonn,base,easy
STATUS
approved