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) = 7*n - a(n-1) - 8, with n>1, a(1)=3.
a(n) = A168331(n-1), n>1. - R. J. Mathar, Nov 25 2009
G.f.: x*(3 + 4*x^2)/((1+x) * (x-1)^2). - R. J. Mathar, Nov 25 2009
a(n) = 3 + 7*floor((n-1)/2). - Bruno Berselli, Sep 18 2013
From G. C. Greubel, Jul 19 2016: (Start)
E.g.f.: (1/4)*(-7 + 16*exp(x) + (14*x - 9)*exp(2*x))*exp(-x).
a(n) = a(n-1) + a(n-2) - a(n-3). (End)
MATHEMATICA
Table[7 n/2 - (7 (-1)^n + 9)/4, {n, 60}] (* Bruno Berselli, Sep 17 2013 *)
CoefficientList[Series[(3 + 4 x^2)/((1 + x) (x - 1)^2), {x, 0, 70}], x] (* Vincenzo Librandi, Sep 17 2013 *)
PROG
(Magma) [n eq 1 select 3 else 7*n-Self(n-1)-8: n in [1..70]]; // Vincenzo Librandi, Sep 17 2013
(PARI) a(n)=(14*n-7*(-1)^n-9)/4 \\ Charles R Greathouse IV, Jul 19 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 24 2009
EXTENSIONS
Definition rewritten using Mathar's formula by Bruno Berselli, Sep 17 2013
STATUS
approved