login
A121471
a(n) = 9*n^2/4 -4*n +19/8 -3*(-1)^n/8.
0
1, 3, 11, 22, 39, 59, 85, 114, 149, 187, 231, 278, 331, 387, 449, 514, 585, 659, 739, 822, 911, 1003, 1101, 1202, 1309, 1419, 1535, 1654, 1779, 1907, 2041, 2178, 2321, 2467, 2619, 2774, 2935, 3099, 3269, 3442, 3621, 3803, 3991, 4182, 4379, 4579, 4785, 4994, 5209
OFFSET
1,2
FORMULA
a(n)= 2*a(n-1) -2*a(n-3) +a(n-4).
G.f.: -x*(1+x+5*x^2+2*x^3)/((1+x)*(x-1)^3).
MATHEMATICA
M := {{0, 1}, {-1, 2} }
v[1] = {1, 3}
w[n_] = If[Mod[n, 2] == 1, {0, 3}, {0, 6}]
v[n_] := v[n] = M.v[n - 1] + w[n]
Table[v[n][[1]], {n, 1, 30}]
CROSSREFS
Sequence in context: A158653 A129215 A139593 * A293766 A178946 A087078
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 07 2006
EXTENSIONS
Definition replaced by polynomial - The Assoc. Editors of the OEIS, Oct 14 2009
STATUS
approved