OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,1,-2,1).
FORMULA
G.f.: (1+x^4)/((1-x)^2*(1-x^7)).
MATHEMATICA
LinearRecurrence[{2, -1, 0, 0, 0, 0, 1, -2, 1}, {1, 2, 3, 4, 6, 8, 10, 13, 16}, 50] (* Harvey P. Dale, May 05 2017 *)
CoefficientList[Series[(1+x^4)/(1-x)^2/(1-x^7), {x, 0, 50}], x] (* Vincenzo Librandi, May 06 2017 *)
PROG
(Magma) I:=[1, 2, 3, 4, 6, 8, 10, 13, 16]; [n le 9 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-7)-2*Self(n-8)+Self(n-9): n in [1..50]]; // Vincenzo Librandi, May 06 2017
(PARI) my(x='x+O('x^50)); Vec((1+x^4)/((1-x)^2*(1-x^7))) \\ G. C. Greubel, Aug 03 2019
(Sage) ((1+x^4)/((1-x)^2*(1-x^7))).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Aug 03 2019
(GAP) a:=[1, 2, 3, 4, 6, 8, 10, 13, 16];; for n in [10..50] do a[n]:=2*a[n-1] -a[n-2]+a[n-7]-2*a[n-8]+a[n-9]; od; a; # G. C. Greubel, Aug 03 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved