OFFSET
0,2
LINKS
MATHEMATICA
LinearRecurrence[{1, 1, 1}, {1, 2, 0}, 35] (* or *)
RecurrenceTable[{a[n] == a[n - 1] + a[n - 2] + a[n - 3], a[1] == 1, a[2] == 2, a[3] == 0}, a, {n, 35}] (* or *)
CoefficientList[Series[(-1 - x + 3 x^2)/(-1 + x + x^2 + x^3), {x, 0, 40}], x]
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; 1, 1, 1]^n*[1; 2; 0])[1, 1] \\ Charles R Greathouse IV, Sep 13 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Nicolas Bègue, Sep 11 2016
STATUS
approved