OFFSET
0,3
COMMENTS
Binomial transform of [0, 1, 1, 2, -2, 4, -8, 16, -32, ...].
Starting with offset 1 = (1, 3, 5, 7, ...) convolved with (1, 0, 3, 0, 5, ...). - Gary W. Adamson, Feb 16 2009
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Mircea Merca, Inequalities and Identities Involving Sums of Integer Functions, J. Integer Sequences, Vol. 14 (2011), Article 11.9.1, p. 11.
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
For even n, a(n) = n*(2*n^2 +3*n +4)/12. For odd n, a(n) = (n+1)*(2*n^2 +n +3)/12. - Washington Bomfim, Jul 31 2008
From R. J. Mathar, Feb 24 2010: (Start)
G.f.: x*(1+x^2)/((1+x)*(1-x)^4).
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5). (End)
From Mircea Merca, Oct 10 2010: (Start)
a(n) = round((2*n^3 + 3*n^2 + 4*n)/12) = round((2*n+1)*(2*n^2 + 3*n + 3)/24) = floor((n+1)*(2*n^2 + n + 3)/12) = ceiling((2*n^3 + 3*n^2 + 4*n)/12).
a(n) = a(n-2) + n^2 - n + 1, n > 1. (End)
a(n) = (2*n*(2*n^2 + 3*n + 4) - 3*(-1)^n + 3)/24. - Bruno Berselli, Dec 07 2010
E.g.f.: (x*(9 + 9*x + 2*x^2)*cosh(x) + (3 + 9*x + 9*x^2 + 2*x^3)*sinh(x))/12. - Stefano Spezia, Dec 21 2021
EXAMPLE
a(3) = 8 = 0 + 1 + 2 + 5.
MAPLE
a(n):=round(1/(12)(2*n^(3)+3*n^(2)+4*n)) # Mircea Merca, Oct 10 2010
MATHEMATICA
CoefficientList[Series[x (1 + x^2)/(1 + x)/(1 - x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
PROG
(PARI) a(n) = (n+[0, 1][n%2+1]) * (2*n^2 +[3, 1][n%2+1]*n +[4, 3][n%2+1])/12 \\ Washington Bomfim, Jul 31 2008
(Magma) [Ceiling((2*n^3+3*n^2+4*n)/12): n in [0..60]]; // Vincenzo Librandi, Jun 25 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Oct 25 2007
STATUS
approved