A157759 a(n) = 15780962*n^2 - 25943924*n + 10662963.
500001, 21898963, 74859849, 159382659, 275467393, 423114051, 602322633, 813093139, 1055425569, 1329319923, 1634776201, 1971794403, 2340374529, 2740516579, 3172220553, 3635486451, 4130314273, 4656704019, 5214655689, 5804169283
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Magma
I:=[500001, 21898963, 74859849]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..30]];
-
Mathematica
LinearRecurrence[{3, -3, 1}, {500001, 21898963, 74859849}, 30]
-
PARI
a(n) = 15780962*n^2 - 25943924*n + 10662963;
Formula
G.f.: x*(500001 - 20398960*x - 10662963*x^2)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
Comments