OFFSET
1,1
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
G.f.: x*(4 + x + 2*x^2)/((1 + x)*(x - 1)^2). - R. J. Mathar, Dec 04 2011
a(n) = -(5/4)*(-1)^n + 7*(n-1)/2 + 11/4. - Viet Quoc Le Tran, Jun 14 2014
a(n) = (14*n - 5*(-1)^n - 3)/4. - David Lovler, Sep 15 2022
E.g.f.: 2 + ((14*x - 3)*exp(x) - 5*exp(-x))/4. - David Lovler, Sep 15 2022
MATHEMATICA
Select[Range[200], MemberQ[{4, 5}, Mod[#, 7]] &] (* Amiram Eldar, May 07 2021 *)
PROG
(PARI) a(n) = (14*n - 5*(-1)^n - 3)/4 \\ David Lovler, Sep 15 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved