OFFSET
0,2
COMMENTS
From Paul Barry, Mar 11 2003: (Start)
Binomial transform of A081190.
Number of strings of length n of the decimal digits 0..9 that contain an even number of 0's. (End)
An equivalent formulation is: a(n) is also the number of words of length n over an alphabet of ten letters with a chosen letter appearing an even number of times. See a comment in A007582, also for the cross references for the 1- to 11-letter word cases. - Wolfdieter Lang, Jul 17 2017
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (18,-80).
FORMULA
G.f.: (1 - 9*x)/((1 - 8*x)*(1 -10*x)).
E.g.f.: exp(9*x)*cosh(x).
a(n) = (8^n + 10^n)/2 = 2^(n-1)*(4^n + 5^n).
a(n) = 18*a(n-1) - 80*a(n-2), a(0) = 1, a(1) = 9.
a(n) = 8*a(n-1) + 10^(n-1), a(1) = 9.
EXAMPLE
For n = 1 there are 9 strings: {1 2 3 4 5 6 7 8 9};
for n = 2 there are 82: {00 11 12 13 14 15 16 17 18 19 21 ... 96 97 98 99}.
MAPLE
MATHEMATICA
Table[8^n/2 + 10^n/2, {n, 0, 19}] (* or *)
LinearRecurrence[{18, -80}, {1, 9}, 19] (* or *)
CoefficientList[Series[(1 - 9 x)/((1 - 8 x) (1 - 10 x)), {x, 0, 19}], x] (* Michael De Vlieger, Jul 17 2017 *)
PROG
(PARI) a(n) = { (8^n + 10^n)/2 } \\ Harry J. Smith, Jul 06 2009
(Magma) [(8^n+10^n)/2: n in [0..20]]; // Vincenzo Librandi, Jul 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Apr 12 2001
EXTENSIONS
Edited by and new name from Wolfdieter Lang, Jul 18 2017
STATUS
approved
