OFFSET
1,1
COMMENTS
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: 82*x*(1303 + 378*x)/(1-x)^2.
E.g.f.: 82*(378 - (378 - 1681*x)*exp(x)). - G. C. Greubel, Jan 11 2022
MATHEMATICA
LinearRecurrence[{2, -1}, {106846, 244688}, 30] (* Harvey P. Dale, Mar 31 2013 *)
82*(1681*Range[30] -378) (* G. C. Greubel, Jan 11 2022 *)
PROG
(Magma) I:=[106846, 244688, 382530]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]];
(PARI) a(n) = 137842*n - 30996
(Sage) [82*(1681*n - 378) for n in (1..30)] # G. C. Greubel, Jan 11 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 23 2009
STATUS
approved