OFFSET
1,1
LINKS
David Lovler, 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)=3. - Vincenzo Librandi, Aug 05 2010
G.f.: x*(3 + 3*x + x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 25 2011
a(n) = 3*n + ceiling(n/2) - 1. - Arkadiusz Wesolowski, Sep 20 2012
a(n) = 4n - 1 - floor(n/2). - Wesley Ivan Hurt, Oct 16 2013
E.g.f.: 1 + ((14*x - 3)*exp(x) - exp(-x))/4. - David Lovler, Sep 14 2022
MAPLE
MATHEMATICA
Flatten[#+{3, 6}&/@(7Range[0, 30])] (* Harvey P. Dale, Jan 11 2011 *)
PROG
(PARI) a(n) = 4*n - 1 - floor(n/2) \\ David Lovler, Sep 14 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved