OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (9, 9, -45).
FORMULA
G.f.: (t^3 + 2*t^2 + 2*t + 1)/(45*t^3 - 9*t^2 - 9*t + 1).
G.f.: (1+x)*(1-x^3)/(1 - 10*x + 54*x^3 - 45*x^4). - G. C. Greubel, Apr 26 2019
MATHEMATICA
Join[{1}, LinearRecurrence[{9, 9, -45}, {11, 110, 1045}, 19]] (* Vincenzo Librandi, Apr 01 2017 *)
CoefficientList[Series[(1+x)*(1-x^3)/(1-10*x+54*x^3-45*x^4), {x, 0, 20}], x] (* or *) coxG[{3, 45, -9}] (* The coxG program is at A169452 *) (* G. C. Greubel, Apr 26 2019 *)
PROG
(Magma) I:=[1, 11, 110, 1045]; [n le 4 select I[n] else 9*Self(n-1) +9*Self(n-2)-45*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 01 2017
(Magma) R<x>:=PowerSeriesRing(Integers(), 20); Coefficients(R!( (1+x)*(1-x^3)/(1-10*x+54*x^3-45*x^4) )); // G. C. Greubel, Apr 26 2019
(PARI) my(x='x+O('x^20)); Vec((1+x)*(1-x^3)/(1-10*x+54*x^3-45*x^4)) \\ G. C. Greubel, Apr 26 2019
(Sage) ((1+x)*(1-x^3)/(1-10*x+54*x^3-45*x^4)).series(x, 20).coefficients(x, sparse=False) # G. C. Greubel, Apr 26 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
John Cannon and N. J. A. Sloane, Dec 03 2009
STATUS
approved