OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
E. Bannai, S. T. Dougherty, M. Harada and M. Oura, Type II Codes, Even Unimodular Lattices and Invariant Rings, IEEE Trans. Information Theory, Volume 45, Number 4, 1999, 1194-1205.
Index entries for linear recurrences with constant coefficients, signature (0,2,1,-1,-2,0,1).
FORMULA
G.f.: (1+x^4)/((1-x^2)^2*(1-x^3)).
a(n) = (1/72) * (9*(-1)^n*(2*n + 3) + 6*n^2 + 18*n + 29 - 8*A061347[n]). - Ralf Stephan, Apr 28 2014
MAPLE
seq(coeff(series((1+x^4)/((1-x^2)^2*(1-x^3)), x, n+1), x, n), n = 0..70); # G. C. Greubel, Sep 11 2019
MATHEMATICA
LinearRecurrence[{0, 2, 1, -1, -2, 0, 1}, {1, 0, 2, 1, 4, 2, 7}, 70] (* Harvey P. Dale, Apr 27 2014 *)
CoefficientList[Series[(1+x^4)/((1-x^2)^2*(1-x^3)), {x, 0, 70}], x] (* Vincenzo Librandi, Apr 28 2014 *)
PROG
(PARI) a(n)=(9*(-1)^n*(2*n + 3) + 6*n^2 + 18*n + 24*!(n%3) + 21)/72 \\ Charles R Greathouse IV, Feb 10 2017
(Magma) R<x>:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1+x^4)/((1-x^2)^2*(1-x^3)) )); // G. C. Greubel, Sep 11 2019
(Sage)
def A008796_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+x^4)/((1-x^2)^2*(1-x^3))).list()
A008796_list(70) # G. C. Greubel, Sep 11 2019
(GAP) a:=[1, 0, 2, 1, 4, 2, 7];; for n in [8..70] do a[n]:=2*a[n-2]+a[n-3]-a[n-4]-2*a[n-5]+a[n-7]; od; a; # G. C. Greubel, Sep 11 2019
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
Definition clarified by N. J. A. Sloane, Feb 02 2018
More terms added by G. C. Greubel, Sep 11 2019
STATUS
approved