OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..900
Index entries for linear recurrences with constant coefficients, signature (21,-128,180).
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)
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 *)
PROG
(Sage) [(10^n - 2^n)/8-(9^n - 2^n)/7 for n in range(2, 20)] # Zerinvary Lajos, Jun 05 2009
(Magma) [(175*10^n +2^n-2*9^(n+2))/14 : n in [0..20]]; // Vincenzo Librandi, Oct 09 2011
(PARI) a(n) = (175*10^n+2^n-162*9^n)/14 \\ Charles R Greathouse IV, Sep 23 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved