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