OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
a(n) = 5*n - a(n-1) - 2, with n>1, a(1)=4.
From Colin Barker, Jun 30 2012: (Start)
a(n) = a(n-1) +a(n-2) -a(n-3).
G.f.: x*(4 + x^2)/((1-x)^2*(1+x)). (End)
E.g.f.: (1/4)*(-5 + 4*exp(x) + (1 + 10*x)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 16 2016
MATHEMATICA
CoefficientList[Series[(4 + x^2) / ((1 - x)^2 (1 + x)), {x, 0, 80}], x] (* Vincenzo Librandi, Sep 16 2013 *)
LinearRecurrence[{1, 1, -1}, {4, 4, 9}, 80] (* Harvey P. Dale, Jul 29 2022 *)
PROG
(Magma) [(1-5*(-1)^n+10*n)/4: n in [1..70]]; // Vincenzo Librandi, Sep 16 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 22 2009
EXTENSIONS
New name from Colin Barker, Jun 30 2012
STATUS
approved