OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-1).
FORMULA
G.f.: -x^2*(-4+5*x) / ( (x-1)*(x^2+x-1) ). - R. J. Mathar, Mar 15 2011
a(n) = 1+A001060(n-2), n>2. - R. J. Mathar, Mar 15 2011
a(n) - a(n-1) = A013655(n-4). - R. J. Mathar, Jun 19 2021
If we start the sequence 1, 3, 6, ... and set the offset to 0, then the sequence has the generating function (1 + x - 3*x^3)/(x^3 - 2*x + 1) and gives the row sums of A374438. - Peter Luschny, Jul 22 2024
MATHEMATICA
Join[{a = 0, b = 4}, Table[c = a+b-1; a=b; b=c, {n, 100}]]
LinearRecurrence[{2, 0, -1}, {0, 4, 3}, 40] (* Harvey P. Dale, Sep 25 2013 *)
CoefficientList[Series[(-x (-4 + 5 x))/((x - 1) (x^2 + x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Sep 26 2013 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 15 2011
EXTENSIONS
Definition adapted to offset by Georg Fischer, Jun 19 2021
STATUS
approved