OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
From Vincenzo Librandi, Mar 01 2012: (Start)
G.f.: x*(59 + 22*x)/(1-x)^2.
a(n) = 2*a(n-1) - a(n-2). (End)
E.g.f.: 22 - (22 - 81*x)*exp(x). - G. C. Greubel, Jun 26 2021
MATHEMATICA
LinearRecurrence[{2, -1}, {59, 140}, 50] (* Vincenzo Librandi, Mar 01 2012 *)
PROG
(PARI) a(n)=81*n-22 \\ Charles R Greathouse IV, Dec 23 2011
(Magma) I:=[59, 140]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..50]]; // Vincenzo Librandi, Mar 01 2012
(Sage) [81*n - 22 for n in (1..50)] # G. C. Greubel, Jun 26 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 16 2009
STATUS
approved