OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) = (2*n^2+4*n+3-(2*n+1)(-1)^n)/2.
a(2*n) = A054569(n).
a(2*n+1) = 2*A014105(n+1).
G.f.: (1+5*x-x^2+3*x^3)/((1-x)^3*(1+x)^2). - Colin Barker, Apr 17 2012
MATHEMATICA
CoefficientList[Series[(1 + 5 x - x^2 + 3 x^3) / ((1 - x)^3 (1 + x)^2), {x, 0, 60}], x] (* Vincenzo Librandi, Aug 08 2013 *)
PROG
(Magma) [(2*n^2+4*n+3-(2*n+1)*(-1)^n)/2: n in [0..50]]; // Vincenzo Librandi, Aug 08 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 19 2003
STATUS
approved