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) - 4, with n>1, a(1)=3.
From R. J. Mathar, Nov 25 2009: (Start)
a(n) = A168209(n-1), n>1.
a(n) = (10*n + 5*(-1)^(n+1) - 3)/4.
G.f.: x*(3 + 2*x^2)/((1+x)*(x-1)^2). (End)
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 16 2013
E.g.f.: (1/4)*(-5 + 8*exp(x) + (10*x - 3)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 17 2016
MATHEMATICA
CoefficientList[Series[(3 + 2 x^2) / ((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 16 2013 *)
Table[5 n/2 - 5 (-1)^n/4 - 3/4, {n, 70}] (* Bruno Berselli, Sep 17 2013 *)
PROG
(Magma) [n le 1 select n+2 else 5*n-Self(n-1)-4: n in [1..70] ]; // Vincenzo Librandi, Sep 16 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 22 2009
EXTENSIONS
Previous definition replaced with the closed form by Bruno Berselli, Sep 17 2013
STATUS
approved