OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = (1/2) * (3^(n+1) - 2^(n+2) + 2n + 3). - Ralf Stephan, Feb 17 2004
G.f: (1/2)*(3/(1-3*x) - 4/(1-2*x) + 2*x/(1-x)^2 + 3/(1-x)). - Vincenzo Librandi, Nov 12 2011
PROG
(Magma) [(1/2) * (3^(n+1) - 2^(n+2) + 2*n + 3): n in [0..30]]; // Vincenzo Librandi, Nov 12 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Corrected by T. D. Noe, Nov 07 2006
STATUS
approved