login
a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks at least one of digits 1,2,3,4,5,6,7,8,9.
19

%I #26 May 15 2019 04:52:34

%S 10,100,1000,10000,100000,1000000,10000000,100000000,999637120,

%T 9980041600,99381289600,985729744000,9726841354240,95404977568000,

%U 929690189228800,8999055703648000,86532737999167360,826798452380099200,7852626768025993600

%N a(n) is the number of nonnegative integers k less than 10^n such that the decimal representation of k lacks at least one of digits 1,2,3,4,5,6,7,8,9.

%C Note that the first eight terms of the sequence are powers of 10.

%H Colin Barker, <a href="/A125858/b125858.txt">Table of n, a(n) for n = 1..1000</a>

%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (45,-870,9450,-63273,269325,-723680,1172700,-1026576,362880).

%F a(n) = 9*9^n-36*8^n+84*7^n-126*6^n+126*5^n-84*4^n+36*3^n-9*2^n+1.

%p f:=n->9*9^n-36*8^n+84*7^n-126*6^n+126*5^n-84*4^n+36*3^n-9*2^n+1;

%t f[n_] := (9*9^n - 36*8^n + 84*7^n - 126*6^n + 126*5^n - 84*4^n + 36*3^n - 9*2^n + 1); Array[f, 18] (* _Robert G. Wilson v_, May 31 2009 *)

%t (* or *) f[n_] := Sum[ -(-1)^k*Binomial[9, k] (10 - k)^n, {k, 9}]; Array[f, 18] (* _Robert G. Wilson v_, May 31 2009 *)

%o (PARI) vector(100, n, 9*9^n-36*8^n+84*7^n-126*6^n+126*5^n-84*4^n+36*3^n-9*2^n+1) \\ _Colin Barker_, Feb 23 2015

%Y Cf. A125630.

%K nonn,base,easy

%O 1,1

%A Aleksandar M. Janjic and _Milan Janjic_, Feb 03 2007

%E Incorrect g.f. removed by _Georg Fischer_, May 15 2019