OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2)
FORMULA
a(n) = 2^(n+1)/3+n+(-1)^n/3.
G.f.: (1-x-2*x^3)/((1+x)*(1-2*x)*(1-x)^2). [Bruno Berselli, Aug 11 2013]
MATHEMATICA
Table[2^(n + 1)/3 + n + (-1)^n/3, {n, 0, 40}] (* Vincenzo Librandi, Aug 10 2013 *)
PROG
(Magma) [2^(n+1)/3+n+(-1)^n/3: n in [0..40]]; // Vincenzo Librandi, Aug 10 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 26 2003
STATUS
approved