A016321 Expansion of 1/((1-2x)(1-9x)(1-10x)).
1, 21, 313, 4065, 49081, 566721, 6350473, 69654225, 751887961, 8016991521, 84652923433, 886876310385, 9231886792441, 95586981129921, 985282830165193, 10117545471478545, 103557909243290521, 1057021183189581921
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..900
- Index entries for linear recurrences with constant coefficients, signature (21,-128,180).
Programs
-
Magma
[(175*10^n +2^n-2*9^(n+2))/14 : n in [0..20]]; // Vincenzo Librandi, Oct 09 2011
-
Mathematica
CoefficientList[Series[1/((1-2x)(1-9x)(1-10x)),{x,0,20}],x] (* or *) LinearRecurrence[{21,-128,180},{1,21,313},20] (* Harvey P. Dale, Aug 18 2014 *)
-
PARI
a(n) = (175*10^n+2^n-162*9^n)/14 \\ Charles R Greathouse IV, Sep 23 2012
-
Sage
[(10^n - 2^n)/8-(9^n - 2^n)/7 for n in range(2,20)] # Zerinvary Lajos, Jun 05 2009
Formula
From Zerinvary Lajos, Jun 05 2009 [corrected by R. J. Mathar, Mar 14 2011]: (Start)
a(n) = 2^(n-1)/7 - 9^(n+2)/7 + 25*10^n/2.
From Vincenzo Librandi, Oct 09 2011: (Start)
a(n) = (175*10^n + 2^n - 2*9^(n+2))/14.
a(n) = 19*a(n-1) - 90*a(n-2) + 2^n.
a(n) = 21*a(n-1) - 128*a(n-2) + 180*a(n-3), n >= 3. (End)