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 (1,1,-1,0,0,0,1,-1,-1,1).
FORMULA
G.f.: (1 -x +x^2 -x^3 -x^4 +x^5 -x^6)/( (1+x)*(1+x+x^2+x^3+x^4+x^5+x^6)*(1-x)^3 ). - R. J. Mathar, Feb 06 2015
MAPLE
seq(coeff(series((1+x^7)/((1-x^2)^2*(1-x^7)), x, n+1), x, n), n = 0..70); # G. C. Greubel, Sep 12 2019
MATHEMATICA
LinearRecurrence[{1, 1, -1, 0, 0, 0, 1, -1, -1, 1}, {1, 0, 2, 0, 3, 0, 4, 2, 5, 4}, 70] (* G. C. Greubel, Sep 12 2019 *)
PROG
(PARI) a(n)=(4*((-1)^(n%7)-1)*(n%7+1)+2*n^2+8*n+55+49*(-1)^n)\56 \\ Tani Akinari, Jul 24 2013
(PARI) Vec((1+x^7)/(1-x^2)^2/(1-x^7) + O(x^70)) \\ Michel Marcus, Feb 06 2015
(Magma) R<x>:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1+x^7)/((1-x^2)^2*(1-x^7)) )); // G. C. Greubel, Sep 12 2019
(Sage)
def A008808_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+x^7)/((1-x^2)^2*(1-x^7))).list()
A008808_list(70) # G. C. Greubel, Sep 12 2019
(GAP) a:=[1, 0, 2, 0, 3, 0, 4, 2, 5, 4];; for n in [11..70] do a[n]:=a[n-1]+a[n-2] -a[n-3]+a[n-7]-a[n-8]-a[n-9]+a[n-10]; od; a; # G. C. Greubel, Sep 12 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms added by G. C. Greubel, Sep 12 2019
STATUS
approved