cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A218556 Numbers with d distinct decimal digits (d=1,...,10) such that for each k=1,...,d, some digit occurs exactly k times.

This page as a plain text file.
%I A218556 #14 Nov 03 2012 13:05:04
%S A218556 0,1,2,3,4,5,6,7,8,9,100,101,110,112,113,114,115,116,117,118,119,121,
%T A218556 122,131,133,141,144,151,155,161,166,171,177,181,188,191,199,200,202,
%U A218556 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
%N A218556 Numbers with d distinct decimal digits (d=1,...,10) such that for each k=1,...,d, some digit occurs exactly k times.
%C A218556 For each of the terms, the number of digits is a triangular number A000217.
%C A218556 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).
%C A218556 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").
%e A218556 The terms a(1)=0 through a(10)=9 have exactly 1 digit occurring exactly once.
%e A218556 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.
%e A218556 The terms a(254)=100012 through a(39133)=999887 are listed in A182040.
%e A218556 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.
%o A218556 (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)))}
%o A218556 (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 }
%Y A218556 Cf. A071925, A181986, A182040, A182092.
%K A218556 nonn,easy,base,fini
%O A218556 1,3
%A A218556 _M. F. Hasler_, Nov 02 2012