login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A019943
Expansion of 1/((1-5*x)*(1-7*x)*(1-9*x)).
1
1, 21, 298, 3570, 38971, 401751, 3988468, 38583300, 366449941, 3434404281, 31873887838, 293663563830, 2690806228111, 24553315831611, 223338364450408, 2026585451393160, 18355202849805481, 166009125098571741, 1499772036736668178, 13537796780062999290
OFFSET
0,2
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
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 *)
PROG
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-5*x)*(1-7*x)*(1-9*x)))); /* or */ 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
(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
(GAP) List([0..20], n -> (5^(n+2) - 2*7^(n+2) + 9^(n+2))/8); # G. C. Greubel, Nov 24 2018
CROSSREFS
Sequence in context: A041844 A295779 A021829 * A021634 A295049 A295377
KEYWORD
nonn
STATUS
approved