OFFSET
0,4
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
From Bruno Berselli, May 06 2011: (Start)
G.f.: x^2*(1+2*x-x^2)/(1-x^2)^3.
a(n) = ((1+2*n-n^2)*(-1)^n -(1-2*n-n^2))/8.
a(n) = a(n-2) + A124625(n) for n>1. (End)
MAPLE
f:=n-> if n mod 2 = 0 then n/2 else (n^2-1)/4; fi;
MATHEMATICA
Flatten[Table[{n, n(n+1)}, {n, 0, 40}]] (* Harvey P. Dale, Jun 21 2015 *)
PROG
(Magma) [IsEven(n) select n/2 else (n^2-1)/4: n in [0..66]]; // Bruno Berselli, May 06 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 26 2007
STATUS
approved