OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (8,-8,8,-7).
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
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved