OFFSET
0,2
FORMULA
From N. J. A. Sloane, Aug 07 2014: if n is even, a(n) = (n+2)*2^(n-1)-(n/2)*binomial(n,n/2) otherwise a(n) = (n+2)*2^(n-1)-((n+1)/4)*binomial(n+1,(n+1)/2). This follows easily from the definition.
MAPLE
f:=n->if (n mod 2) = 0 then (n+2)*2^(n-1)-(n/2)*binomial(n, n/2)
else (n+2)*2^(n-1)-((n+1)/4)*binomial(n+1, (n+1)/2); fi;
[seq(f(n), n=0..40)];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Oct 11 2008
EXTENSIONS
Edited with more terms by N. J. A. Sloane, Aug 07 2014
STATUS
approved