login
A135431
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) with a(0)=0, a(1)=1, a(2)=2 and a(3)=3.
2
0, 1, 2, 3, 6, 10, 17, 30, 51, 88, 152, 261, 450, 775, 1334, 2298, 3957, 6814, 11735, 20208, 34800, 59929, 103202, 177723, 306054, 527050, 907625, 1563006, 2691627, 4635208, 7982216, 13746045, 23671842, 40764895, 70200566, 120891258, 208184877, 358511806
OFFSET
0,3
FORMULA
From R. J. Mathar, Mar 31 2008: (Start)
O.g.f.: x*(1+x)/(1-x-x^2-x^3+x^4).
a(n) = A116732(n+1) + A116732(n+2). (End)
MATHEMATICA
LinearRecurrence[{1, 1, 1, -1}, {0, 1, 2, 3}, 40] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2012 *)
nxt[{a_, b_, c_, d_}]:={b, c, d, d+c+b-a}; NestList[nxt, {0, 1, 2, 3}, 40][[All, 1]] (* Harvey P. Dale, Feb 28 2021 *)
CROSSREFS
Sequence in context: A344615 A245437 A285665 * A123908 A233268 A026397
KEYWORD
nonn
AUTHOR
Mohamed Bouhamida, Dec 13 2007
STATUS
approved