OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,1,-2,1).
FORMULA
a(n) = SUM[i=1..n] A116966(n). a(n) = SUM[i=1..n] (n + {1,2,0,1} according as n == {0,1,2,3} mod 4). a(n) = A000217(n) = n*(n+1)/2 unless n == 2 mod 4 in which case a(n) = A000217(n)+1 = (n*(n+1)/2)+1.
G.f.: -x*(2*x^3-x^2+2*x+1) / ((x-1)^3*(x+1)*(x^2+1)). - Colin Barker, Apr 30 2013
EXAMPLE
MATHEMATICA
Series[(1+2*x-x^2+2*x^3)/(1-x-x^4+x^5), {x, 0, 48}] // CoefficientList[#, x]& // Accumulate // Prepend[#, 0]& (* Jean-François Alcover, Apr 30 2013 *)
PROG
(PARI) concat([0], Vec(-x*(2*x^3-x^2+2*x+1) / ((x-1)^3*(x+1)*(x^2+1))+O(x^66))) \\ Joerg Arndt, Apr 30 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Apr 02 2006
EXTENSIONS
More terms from Colin Barker, Apr 30 2013
STATUS
approved