OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-1,-1,1,-1,2,-1).
FORMULA
a(0)=1, a(1)=2, a(2)=3, a(3)=5, a(4)=8, a(5)=11, a(6)=15, a(7)=20, a(8)=26, a(n) = 2*a(n-1) -a(n-2) +a(n-3) -a(n-4) -a(n-5) +a(n-6) -a(n-7) +2*a(n-8) -a(n-9). - Harvey P. Dale, Mar 19 2013
G.f.: 1/( (1+x)*(1+x^2)*(1+x+x^2)*(1-x)^4 ). - R. J. Mathar, Aug 06 2013
MAPLE
seq(coeff(series( (1+x)/mul(1-x^j, j=1..4) , x, n+1), x, n), n = 0..60); # G. C. Greubel, Sep 09 2019
MATHEMATICA
CoefficientList[Series[(x+1)/Times@@(1-x^Range[4]), {x, 0, 60}], x] (* or *) LinearRecurrence[{2, -1, 1, -1, -1, 1, -1, 2, -1}, {1, 2, 3, 5, 8, 11, 15, 20, 26}, 60] (* Harvey P. Dale, Mar 19 2013 *)
PROG
(PARI) my(x='x+O('x^60)); Vec( (1+x)/prod(j=1, 4, 1-x^j) ) \\ G. C. Greubel, Sep 09 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x)/(&*[1-x^j: j in [1..4]]) )); // G. C. Greubel, Sep 09 2019
(Sage)
def AA008762_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1+x)/prod(1-x^j for j in (1..4)) ).list()
AA008762_list(60) # G. C. Greubel, Sep 09 2019
(GAP) a:=[1, 2, 3, 5, 8, 11, 15, 20, 26];; for n in [10..60] do a[n]:=2*a[n-1] -a[n-2]+a[n-3]-a[n-4]-a[n-5]+a[n-6]-a[n-7]+2*a[n-8]-a[n-9]; od; a; # G. C. Greubel, Sep 09 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Terms a(43) onward added by G. C. Greubel, Sep 09 2019
STATUS
approved