OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
G.f.: x*(2 + 9*x - 2*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Jul 10 2011
E.g.f.: (1/4)*(9 - 8*exp(x) + (18*x - 1)*exp(2*x))*exp(-x). - G. C. Greubel, Jul 22 2016
EXAMPLE
For n=2, a(2)=9*2-2-5=11; n=3, a(3)=9*3-11-5=11; n=4, a(4)=9*4-11-5=20.
MATHEMATICA
LinearRecurrence[{1, 1, -1}, {2, 11, 11}, 50] (* G. C. Greubel, Jul 22 2016 *)
PROG
(Magma) [-(1/4)+(9/4)*(-1)^n+(9/2)*n: n in [1..60]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Nov 25 2009
STATUS
approved