OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,0,0,0,0,1,-2,1).
FORMULA
G.f.: (1+x^10)/((1-x)^2*(1-x^10)).
a(0)=1, a(1)=2, a(2)=3, a(3)=4, a(4)=5, a(5)=6, a(6)=7, a(7)=8, a(8)=9, a(9)=10, a(10)=13, a(11)=16, a(n) = 2*a(n-1) - a(n-2) + a(n-10) - 2*a(n-11) + a(n-12). - Harvey P. Dale, Jul 31 2014
MAPLE
seq(coeff(series((1+x^10)/((1-x)^2*(1-x^10)), x, n+1), x, n), n = 0..80); # G. C. Greubel, Sep 12 2019
MATHEMATICA
CoefficientList[Series[(1+x^10)/(1-x)^2/(1-x^10), {x, 0, 80}], x] (* or *) LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1}, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 16}, 80] (* Harvey P. Dale, Jul 31 2014 *)
PROG
(PARI) my(x='x+O('x^80)); Vec((1+x^10)/((1-x)^2*(1-x^10))) \\ G. C. Greubel, Sep 12 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1+x^10)/((1-x)^2*(1-x^10)) )); // G. C. Greubel, Sep 12 2019
(Sage)
def A008817_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+x^10)/((1-x)^2*(1-x^10))).list()
A008817_list(80) # G. C. Greubel, Sep 12 2019
(GAP) a:=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 16];; for n in [13..80] do a[n]:=2*a[n-1]-a[n-2]+a[n-10]-2*a[n-11]+a[n-12]; od; a; # G. C. Greubel, Sep 12 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved