OFFSET
0,2
FORMULA
a(n) = n*(4*n^2 + 12*n + 11)/6 + 1/4 - (-1)^n/4 = floor(A000447(n+1)/2).
G.f.: x*(5 + 2*x + x^2)/((1-x)^4*(1+x)). - Vincenzo Librandi, May 12 2015
MAPLE
seq(n*(4*n^2-1)/6 - 1/4 + 1/4*(-1)^n, n=1..50);
MATHEMATICA
Table[n (4 n^2 + 12 n + 11)/6 + 1/4 - (-1)^n/4, {n, 0, 60}] (* Vincenzo Librandi, May 12 2015 *)
PROG
(Magma) [n*(4*n^2+12*n+11)/6+1/4-(-1)^n/4: n in [0..60]]; // Vincenzo Librandi, May 12 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Floor van Lamoen, Nov 19 2005
EXTENSIONS
Closed formula adapted to the offset by Bruno Berselli, May 12 2015
STATUS
approved