OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (22,-155,350).
FORMULA
a(n) = 5*5^n/2 - 49*7^n/6 + 20*10^n/3. - R. J. Mathar, Jun 29 2013
From Vincenzo Librandi, Jul 03 2013: (Start)
a(n) = 22*a(n-1) - 155*a(n-2) + 350*a(n-3); a(0)=1, a(1)=22, a(2)=329.
a(n) = 17*a(n-1) - 70*a(n-2) + 5^n. (End)
MATHEMATICA
CoefficientList[Series[1/((1-5x)(1-7x)(1-10x)), {x, 0, 20}], x] (* Vincenzo Librandi, Jul 03 2013 *)
LinearRecurrence[{22, -155, 350}, {1, 22, 329}, 20] (* G. C. Greubel, Nov 22 2018 *)
PROG
(Magma) m:=20; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(1/((1-5*x)*(1-7*x)*(1-10*x)))); /* or */ I:=[1, 22, 329]; [n le 3 select I[n] else 22*Self(n-1)-155*Self(n-2)+350*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Jul 03 2013
(PARI) x='x+O('x^20); Vec(1/((1-5*x)*(1-7*x)*(1-10*x))) \\ G. C. Greubel, Nov 22 2018
(Sage) s=(1/((1-5*x)*(1-7*x)*(1-10*x))).series(x, 20); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 22 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved