OFFSET
0,3
COMMENTS
This is n times the sum of the second parts of the partitions of n+1 into exactly two parts. - Wesley Ivan Hurt, Sep 21 2013
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).
FORMULA
a(n) = (n, n, n, n, n, ...) * (1, 0, 2, 0, 3, ...) using length n vectors.
G.f.: x*(1+x+4*x^2)/((1+x)^3*(1-x)^4).
a(n) = n*(2*n*(n+3) - (2*n+3)*(-1)^n + 3)/16. - Bruno Berselli, Feb 14 2011
a(n) = n*ceiling(n/2)*(ceiling(n/2)+1)/2 = (n+1)*A008805(n). - Wesley Ivan Hurt, Sep 21 2013
EXAMPLE
a(4) = 12 = (4, 4, 4, 4) * (1, 0, 2, 0) = (4 + 0 + 8 + 0).
a(5) = 30; 5+1=6 has exactly 3 partitions into 2 parts: (5,1),(4,2),(3,3). Adding the second parts of these partitions and multiplying the result by 5, we get 5*6=30. - Wesley Ivan Hurt, Sep 21 2013
MAPLE
a:= proc(n) local m; m:= ceil (n/2); n *m *(m+1) /2 end:
seq (a(n), n=0..60);
seq(k*sum(i, i=1..ceil(k/2), k=0..70)); # Wesley Ivan Hurt, Sep 21 2013
MATHEMATICA
nn=50; With[{tnos=Accumulate[Range[nn]]}, Table[n tnos[[Ceiling[n/2]]], {n, 0, nn}]] (* or *) LinearRecurrence[{1, 3, -3, -3, 3, 1, -1}, {0, 1, 2, 9, 12, 30, 36}, 50] (* Harvey P. Dale, May 12 2012 *)
Table[n*Ceiling[n/2]*(Ceiling[n/2]+1)/2, {n, 0, 100}] (* Wesley Ivan Hurt, Sep 21 2013 *)
PROG
(Magma) [n*Ceiling(n/2)*(Ceiling(n/2)+1)/2: n in [0..44]]; // Bruno Berselli, Feb 14 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Dec 20 2010
EXTENSIONS
Edited by Alois P. Heinz, Dec 23 2010
STATUS
approved