OFFSET
1,3
COMMENTS
For each of the terms, the number of digits is a triangular number A000217.
The number of terms with d = 1,2,3,... different digits is 10, 243, 38880, ... = A218566(10,d) (+ 1 for d=1, accounting for the initial 0).
The sequence is finite, it has N = 1 + sum_{i=1..10} A218566(10,i) = 9083370609101493843078695864582213215764827510991133 terms. The last term is a(N) = 9999999999888888888777777776666666555555444443333222110 (ten "9"s, nine "8"s, ..., one "0").
EXAMPLE
The terms a(1)=0 through a(10)=9 have exactly 1 digit occurring exactly once.
The terms a(11)=100 through a(253)=998, listed in A210666, have one digit occurring once and a second, different digit occurring exactly twice.
The terms a(254)=100012 through a(39133)=999887 are listed in A182040.
For d=4, we have the (1+2+3+4 =) 10-digit terms a(39134)=1000011223 through 9999888776 with 4 different digits which occur with frequencies 1,2,3 and 4.
PROG
(PARI) {my(T(n)=n*(n+1)\2); print1(0); for(i=1, 2, s=vector(i+1, j, j-1); for(n=10^(T(i)-1), 10^T(i)-1, i !=#Set(digits(n)) & next; c=vector(10); for(j=1, #d=digits(n), c[d[j]+1]++); vecsort(c, , 8)==s & print1(", "n)))}
(PARI) is_A218556(n)={ my(c=vector(10)); for(i=1, #n=digits(n), c[n[i]+1]++); #(c=vecsort(c, , 8))==1+c[#c] && 2*#n==c[#c]*#c }
CROSSREFS
KEYWORD
nonn,easy,base,fini
AUTHOR
M. F. Hasler, Nov 02 2012
STATUS
approved