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
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 1/4 + 7*n/2 - 5*(-1)^n/4.
G.f.: x*(5 + x + x^2) / ( (1+x)*(x-1)^2 ). (End)
E.g.f.: 1 + ((14*x + 1)*exp(x) - 5*exp(-x))/4. - David Lovler, Sep 26 2022
PROG
(PARI) a(n) = (14*n + 1 - 5*(-1)^n)/4 \\ David Lovler, Sep 26 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved