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
G.f.: -x*(-2-8*x+4*x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 13 2013
From G. C. Greubel, May 16 2016: (Start)
E.g.f.: (1/2)*(3*(1 + 2*x)*exp(x) + 5*exp(-x) - 8).
a(n) = a(n-1) + a(n-2) - a(n-3). (End)
a(n) = 2*A166517(n). - Philippe Deléham, Nov 29 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = 1/4 + Pi/(6*sqrt(3)). - Amiram Eldar, Feb 23 2023
MATHEMATICA
CoefficientList[Series[-(- 2 - 8 x + 4 x^2)/((1 + x) (x - 1)^2), {x, 0, 80}], x] (* Vincenzo Librandi, Sep 13 2013 *)
LinearRecurrence[{1, 1, -1}, {2, 10, 8}, 50] (* G. C. Greubel, May 16 2016 *)
PROG
(Magma) [n eq 1 select 2 else 6*n-Self(n-1): n in [1..80]]; // Vincenzo Librandi, Sep 13 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Oct 16 2009
STATUS
approved