OFFSET
0,3
LINKS
G. C. Greubel, 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(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); a(0)=1, a(1)=1, a(2)=2, a(3)=3, a(4)=5, a(5)=6, a(6)=9, a(7)=12, a(8)=16. - Harvey P. Dale, Jul 06 2011
a(n) = floor((2*n^3 + 9*n^2 + 72*n + 160)/144). - Tani Akinari, May 13 2014
MAPLE
seq(coeff(series((1+x^7)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)), x, n+1), x, n), n = 0 .. 60); # G. C. Greubel, Sep 10 2019
MATHEMATICA
CoefficientList[Series[(1+x^7)/(1-x)/(1-x^2)/(1-x^3)/(1-x^4), {x, 0, 50}], x] (* or *) LinearRecurrence[{2, -1, 1, -1, -1, 1, -1, 2, -1}, {1, 1, 2, 3, 5, 6, 9, 12, 16}, 50] (* Harvey P. Dale, Jul 06 2011 *)
PROG
(PARI) my(x='x+O('x^60)); Vec((1+x^7)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4))) \\ G. C. Greubel, Sep 10 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1+x^7)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) )); // G. C. Greubel, Sep 10 2019
(Sage)
def A008768_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+x^7)/((1-x)*(1-x^2)*(1-x^3)*(1-x^4))).list()
A008768_list(60) # G. C. Greubel, Sep 10 2019
(GAP) a:=[1, 1, 2, 3, 5, 6, 9, 12, 16];; 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 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved