A019943 Expansion of 1/((1-5*x)*(1-7*x)*(1-9*x)).
1, 21, 298, 3570, 38971, 401751, 3988468, 38583300, 366449941, 3434404281, 31873887838, 293663563830, 2690806228111, 24553315831611, 223338364450408, 2026585451393160, 18355202849805481, 166009125098571741, 1499772036736668178, 13537796780062999290
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
- Index entries for linear recurrences with constant coefficients, signature (21,-143,315).
Programs
-
GAP
List([0..20], n -> (5^(n+2) - 2*7^(n+2) + 9^(n+2))/8); # G. C. Greubel, Nov 24 2018
-
Magma
m:=20; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-5*x)*(1-7*x)*(1-9*x)))); // Vincenzo Librandi, Jul 03 2013 -
Magma
I:=[1, 21, 298]; [n le 3 select I[n] else 21*Self(n-1)-143*Self(n-2)+315*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jul 03 2013
-
Magma
[(5^(n+2) - 2*7^(n+2) + 9^(n+2))/8: n in [0..20]]; // G. C. Greubel, Nov 24 2018
-
Maple
a:= n-> (Matrix(3, (i, j)-> `if`(i=j-1, 1, `if`(j=1, [21, -143, 315][i], 0)))^n)[1, 1]: seq(a(n), n=0..25); # Alois P. Heinz, Jul 03 2013
-
Mathematica
CoefficientList[Series[1/((1-5x)(1-7x)(1-9 x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jul 03 2013 *) LinearRecurrence[{21,-143,315}, {1, 21, 298}, 20] (* or *) Table[(5^(n+2) - 2*7^(n+2) + 9^(n+2))/8, {n,0,20}] (* G. C. Greubel, Nov 24 2018 *)
-
PARI
vector(20, n, n--; (5^(n+2) - 2*7^(n+2) + 9^(n+2))/8) \\ G. C. Greubel, Nov 24 2018
-
Sage
[(5^(n+2) - 2*7^(n+2) + 9^(n+2))/8 for n in range(20)] # G. C. Greubel, Nov 24 2018
Formula
a(n) = (5^(n+2) - 2*7^(n+2) + 9^(n+2))/8. - R. J. Mathar, Jun 29 2013
a(0)=1, a(1)=21, a(2)=298; for n>2, a(n) = 21*a(n-1) -143*a(n-2) +315*a(n-3). - Vincenzo Librandi, Jul 03 2013
a(n) = 16*a(n-1) -63*a(n-2) +5^n. - Vincenzo Librandi, Jul 03 2013
E.g.f.: (25*exp(5*x) - 98*exp(7*x) + 81*exp(9*x))/8. - G. C. Greubel, Nov 24 2018
From Seiichi Manyama, May 04 2025: (Start)
a(n) = Sum_{k=0..n} 2^k * 5^(n-k) * binomial(n+2,k+2) * Stirling2(k+2,2).
a(n) = Sum_{k=0..n} (-2)^k * 9^(n-k) * binomial(n+2,k+2) * Stirling2(k+2,2). (End)