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) = 8*n - a(n-1) - 4, with n>1, a(1)=2.
G.f.: 2*x*(1 + 4*x - x^2)/((1+x)*(x-1)^2). - Vincenzo Librandi, Sep 18 2013
a(n) = a(n-1) +a(n-2) -a(n-3). - Vincenzo Librandi, Sep 18 2013
From Bruno Berselli, Sep 18 2013: (Start)
a(n) = 2*A163980(n).
a(n) = 2 + 8*floor(n/2). (End)
E.g.f.: 2*(1 - exp(x) + 2*x*exp(2*x))*exp(-x). - G. C. Greubel, Jul 19 2016
MATHEMATICA
CoefficientList[Series[(2 + 8 x - 2 x^2)/((1 + x) (x -1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 18 2013 *)
PROG
(Magma) [4*n +2*(-1)^n: n in [1..70]]; // Vincenzo Librandi, Sep 18 2013
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Vincenzo Librandi, Nov 24 2009
EXTENSIONS
Definition rewritten by Vincenzo Librandi, Sep 18 2013
STATUS
approved