A380860 Triangle read by rows: T(n,m) (0<=m<=n) = number of positive n-digit numbers that have exactly m copies of a specific, previously selected positive base-10 digit among its digits.
1, 8, 1, 72, 17, 1, 648, 225, 26, 1, 5832, 2673, 459, 35, 1, 52488, 29889, 6804, 774, 44, 1, 472392, 321489, 91125, 13770, 1170, 53, 1, 4251528, 3365793, 1141614, 215055, 24300, 1647, 62, 1, 38263752, 34543665, 13640319, 3077109, 433755, 39123, 2205, 71, 1, 344373768, 349156737, 157306536, 41334300, 6980904, 785862, 58968, 2844, 80, 1
Offset: 0
Examples
Rows n=0..7 of the triangle are: 1; 8, 1; 72, 17, 1; 648, 225, 26, 1; 5832, 2673, 459, 35, 1; 52488, 29889, 6804, 774, 44, 1; 472392, 321489, 91125, 13770, 1170, 53, 1; 4251528, 3365793, 1141614, 215055, 24300, 1647, 62, 1; ...
Links
- Paolo Xausa, Table of n, a(n) for n = 0..11475 (rows 0..150 of triangle, flattened).
Programs
-
Maple
seq(lprint(seq(floor(9^(n-m)*(binomial(n-1, m-1)+(8/9)*binomial(n-1, m))), m=0..n)), n=0..7);
-
Mathematica
A380860[n_, m_] := Floor[9^(n-m)*(Binomial[n-1, m-1] + 8/9*Binomial[n-1, m])]; Table[A380860[n, m], {n, 0, 10}, {m, 0, n}] (* Paolo Xausa, Feb 07 2025 *)
Formula
T(n,m) = floor(9^(n-m)*(binomial(n-1,m-1)+8/9*binomial(n-1,m))), considering binomial(k,-1)=0 for k>=0 and binomial(k,l)=0 for k>=0 with k