OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
a(n) = 2*a(n-1) -a(n-2).
G.f.: x*(120+x)/(x-1)^2.
MATHEMATICA
Table[121n-1, {n, 50}]
PROG
(Magma) I:=[120, 241]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..50]];
(PARI) a(n) = 121*n - 1.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 13 2009
STATUS
approved