A024052 a(n) = 5^n - n^3.
1, 4, 17, 98, 561, 3000, 15409, 77782, 390113, 1952396, 9764625, 48826794, 244138897, 1220700928, 6103512881, 30517574750, 152587886529, 762939448212, 3814697259793, 19073486321266, 95367431632625
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- Index entries for linear recurrences with constant coefficients, signature (9,-26,34,-21,5).
Programs
-
Magma
[5^n-n^3: n in [0..35]]; // Vincenzo Librandi, Jun 12 2011
-
Mathematica
LinearRecurrence[{9,-26,34,-21,5},{1,4,17,98,561},30] (* Harvey P. Dale, Apr 02 2025 *)
Formula
G.f.: (1 - 5*x + 7*x^2 + 15*x^3 + 6*x^4)/((1-5*x)*(1-x)^4). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 13 2009
a(n) = 9*a(n-1) - 26*a(n-2) + 34*a(n-3) - 21*a(n-4) + 5*a(n-5).