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) - 4 with n > 1, a(1)=4. - Vincenzo Librandi, Aug 05 2010
From Colin Barker, Mar 13 2012: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3).
G.f.: x*(4 + 2*x + x^2)/((1-x)^2*(1+x)). (End)
a(n) = (-1 - 3*(-1)^n + 14*n)/4. - Colin Barker, May 14 2012
a(n) = floor(7*n/2) - (-1)^n. - Wesley Ivan Hurt, Sep 12 2017
E.g.f.: 1 + ((14*x - 1)*exp(x) - 3*exp(-x))/4. - David Lovler, Sep 15 2022
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {4, 6, 11}, 50] (* Harvey P. Dale, Jan 18 2013 *)
PROG
(PARI) a(n) = (-1 - 3*(-1)^n + 14*n)/4 \\ David Lovler, Sep 15 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved