OFFSET
0,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-3,1).
FORMULA
a(n) = 1 + A001654(n-2).
MATHEMATICA
LinearRecurrence[{3, 0, -3, 1}, {0, 1, 1, 2}, 50] (* Vincenzo Librandi, Aug 22 2012 *)
CoefficientList[Series[x (1-2x-x^2)/((1-x)(1+x)(1-3x+x^2)), {x, 0, 40}], x] (* Harvey P. Dale, May 31 2020 *)
PROG
(Magma) I:=[ 0, 1, 1, 2]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-3) +Self(n-4): n in [1..40]] // Vincenzo Librandi, Aug 22 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, May 24 2005, corrected Sep 04 2008
EXTENSIONS
Replaced with a regular sequence by R. J. Mathar, Aug 31 2011
STATUS
approved