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,1,-2,1).
FORMULA
a(n) = floor(n*(2*n+3)/5) + 1. - Tani Akinari, Jun 15 2014
a(0)=1, a(1)=2, a(2)=3, a(3)=6, a(4)=9, a(5)=14, a(6)=19, a(n)= 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7). - Harvey P. Dale, Jan 02 2016
MAPLE
seq(coeff(series((1+2*x^3+x^5)/((1-x)^2*(1-x^5)), x, n+1), x, n), n = 0..50); # G. C. Greubel, Sep 13 2019
MATHEMATICA
CoefficientList[Series[(1+2x^3+x^5)/(1-x)^2/(1-x^5), {x, 0, 50}], x] (* or *) LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {1, 2, 3, 6, 9, 14, 19}, 50] (* Harvey P. Dale, Jan 02 2016 *)
PROG
(PARI) Vec((1+2*x^3+x^5)/(1-x)^2/(1-x^5)+ O(x^50)) \\ Michel Marcus, Jun 15 2014
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1+2*x^3+x^5)/((1-x)^2*(1-x^5)) )); // G. C. Greubel, Sep 13 2019
(Sage)
def A008823_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+2*x^3+x^5)/((1-x)^2*(1-x^5))).list()
A008823_list(50) # G. C. Greubel, Sep 13 2019
(GAP) a:=[1, 2, 3, 6, 9, 14, 19];; for n in [8..50] do a[n]:=2*a[n-1]-a[n-2] +a[n-5]-2*a[n-6]+a[n-7]; od; a; # G. C. Greubel, Sep 13 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved