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