A337127 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).
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, 567, 3888, 4536, 0, 0, 0, 0, 0, 0, 9, 1215, 16200, 45360, 27216, 0, 0, 0, 0, 0, 9, 2511, 58320, 294840, 408240, 136080, 0, 0, 0, 0, 9, 5103, 195048, 1587600, 3810240, 2857680, 544320, 0, 0, 0
Offset: 1
Examples
The table T(n, k) begins: 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 567 3888 4536 0 0 0 0 0 0 9 1215 16200 45360 27216 0 0 0 0 0 9 2511 58320 294840 408240 136080 0 0 0 0 ...
Crossrefs
Programs
-
Mathematica
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
Formula
T(n, k) = 9*Pochhammer(11-k, k-1)*n! * [x^n] (exp(x) - 1)^k/k!.
T(n, k) = 9*Pochhammer(11-k, k-1) * [x^n] x^k/Product_{j=1..k} (1-j*x).
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.