login
A121311
a(0) = 1, a(1) = 2, a(2) = 5; for n >= 3, a(n) = a(n - 1) - 2*a(n - 2) + a(n - 3).
0
1, 2, 5, 2, -6, -5, 9, 13, -10, -27, 6, 50, 11, -83, -55, 122, 149, -150, -326, 123, 625, 53, -1074, -555, 1646, 1682, -2165, -3883, 2129, 7730, -411, -13742, -5190, 21883, 18521, -30435, -45594, 33797, 94550, -18638, -173941, -42115, 287129, 197418, -418955, -526662, 508666, 1143035, -400959
OFFSET
0,2
FORMULA
O.g.f.: -(1+x+5*x^2)/(-1+x-2*x^2+x^3) . - R. J. Mathar, Dec 10 2007
MATHEMATICA
a[0] = 1; a[1] = 2; a[2] = 5; a[n_] := a[n] = a[n - 1] - 2a[n - 2] + a[n - 3]; Table[ a[n], {n, 0, 40}]
LinearRecurrence[{1, -2, 1}, {1, 2, 5}, 50] (* Harvey P. Dale, Dec 05 2012 *)
CROSSREFS
Cf. A101399.
Sequence in context: A309431 A344077 A198539 * A242403 A179015 A195621
KEYWORD
sign,easy
AUTHOR
Zak Seidov, Aug 25 2006
EXTENSIONS
Offset adapted to definition by Georg Fischer, Jun 18 2021
STATUS
approved