login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218556 Numbers with d distinct decimal digits (d=1,...,10) such that for each k=1,...,d, some digit occurs exactly k times. 5
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 101, 110, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 131, 133, 141, 144, 151, 155, 161, 166, 171, 177, 181, 188, 191, 199, 200, 202, 211, 212, 220, 221, 223, 224, 225, 226, 227, 228, 229, 232, 233, 242, 244, 252, 255, 262, 266, 272, 277, 282, 288, 292, 299, 300, 303, 311, 313, 322, 323, 330 (list; graph; refs; listen; history; text; internal format)
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").
LINKS
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
Sequence in context: A171120 A092907 A051022 * A043314 A088472 A087019
KEYWORD
nonn,easy,base,fini
AUTHOR
M. F. Hasler, Nov 02 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 19:26 EDT 2024. Contains 375113 sequences. (Running on oeis4.)