login
Table with 10 columns read by rows: T(n, k) is the number of n-digit positive integers with exactly k distinct base 10 digits (0 < k <= 10).
3

%I #50 Sep 23 2020 11:21:47

%S 9,0,0,0,0,0,0,0,0,0,9,81,0,0,0,0,0,0,0,0,9,243,648,0,0,0,0,0,0,0,9,

%T 567,3888,4536,0,0,0,0,0,0,9,1215,16200,45360,27216,0,0,0,0,0,9,2511,

%U 58320,294840,408240,136080,0,0,0,0,9,5103,195048,1587600,3810240,2857680,544320,0,0,0

%N Table with 10 columns read by rows: T(n, k) is the number of n-digit positive integers with exactly k distinct base 10 digits (0 < k <= 10).

%H <a href="/index/Di#digits">Index entries for sequences related to digits</a>.

%F T(n, k) = 9*Pochhammer(11-k, k-1)*n! * [x^n] (exp(x) - 1)^k/k!.

%F T(n, k) = 9*Pochhammer(11-k, k-1) * [x^n] x^k/Product_{j=1..k} (1-j*x).

%F T(n, k) = 9*Pochhammer(11-k, k-1)*S2(n, k) where S2(n, k) = A048993(n, k) are the Stirling numbers of the 2nd kind.

%e The table T(n, k) begins:

%e 9 0 0 0 0 0 0 0 0 0

%e 9 81 0 0 0 0 0 0 0 0

%e 9 243 648 0 0 0 0 0 0 0

%e 9 567 3888 4536 0 0 0 0 0 0

%e 9 1215 16200 45360 27216 0 0 0 0 0

%e 9 2511 58320 294840 408240 136080 0 0 0 0

%e ...

%t T[n_,k_]:=9Pochhammer[11-k,k-1]/k!*n!*Coefficient[Series[(Exp[x]-1)^k,{x,0,n}],x,n]; Table[T[n,k],{n,7},{k,10}]//Flatten

%Y Cf. A010785, A031955, A031962, A031969, A031987, A116670, A171102, A218019, A219743, A220076.

%Y Cf. A010734, A048993, A052268 (row sums), A073531 (diagonal), A180599 (k = 1), A335843 (k = 2), A337313 (k = 3).

%K nonn,tabf,base

%O 1,1

%A _Stefano Spezia_, Aug 17 2020