login
A037719
Base-7 digits are, in order, the first n terms of the periodic sequence with initial period 2,0,1,3.
2
2, 14, 99, 696, 4874, 34118, 238827, 1671792, 11702546, 81917822, 573424755, 4013973288, 28097813018, 196684691126, 1376792837883, 9637549865184, 67462849056290, 472239943394030, 3305679603758211, 23139757226307480, 161978300584152362, 1133848104089066534
OFFSET
1,1
FORMULA
a(n) = 8*a(n-1) - 8*a(n-2) + 8*a(n-3) - 7*a(n-4).
From Colin Barker, Dec 24 2015: (Start)
a(n) = 1/100*(-(2-11*i)*(-i)^n-(2+11*i)*i^n+29*7^n-25) where i=sqrt(-1).
G.f.: x*(2-2*x+3*x^2) / ((1-x)*(1-7*x)*(1+x^2)).
(End)
MATHEMATICA
Table[FromDigits[PadRight[{}, n, {2, 0, 1, 3}], 7], {n, 30}] (* or *) LinearRecurrence[ {8, -8, 8, -7}, {2, 14, 99, 696}, 30] (* Harvey P. Dale, Nov 04 2019 *)
PROG
(PARI) Vec(x*(2-2*x+3*x^2)/((1-x)*(1-7*x)*(1+x^2)) + O(x^30)) \\ Colin Barker, Dec 24 2015
CROSSREFS
Sequence in context: A370617 A247481 A037516 * A158811 A198280 A360319
KEYWORD
nonn,base,easy
STATUS
approved