login
A329301
a(0) = a(1) = a(2) = 1; thereafter a(n) = a(n-1) - (-1)^n*a(n-2) + 2*a(n-3).
1
1, 1, 1, 2, 3, 3, 4, 7, 9, 10, 15, 23, 28, 35, 53, 74, 91, 123, 180, 239, 305, 426, 599, 783, 1036, 1451, 1981, 2602, 3523, 4883, 6564, 8727, 11929, 16330, 21855, 29383, 40188, 54515, 73093, 98954, 134891, 182123, 245140, 332799, 451905, 609386, 823079, 1117503, 1513196, 2041851
OFFSET
0,4
FORMULA
G.f.: (-1 - x^2)/(-1 + x - x^2 + 2*x^3). - Stefano Spezia, Nov 30 2019
MATHEMATICA
CoefficientList[Series[(-1 - x^2)/(-1 + x - x^2 + 2 x^3), {x, 0, 49}], x] (* Michael De Vlieger, Dec 14 2019 *)
PROG
(Magma) [1, 1] cat [ n le 3 select n else Self(n-1)-(-1)^n*Self(n-2)+2*Self(n-3): n in [1..55]];
CROSSREFS
Cf. A000930.
Sequence in context: A035535 A154309 A249579 * A327134 A140514 A240209
KEYWORD
nonn,easy
AUTHOR
STATUS
approved