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.

A247700 Numbers which have d digits "d", whenever one of their digits is "d", ordered by largest digit, then by size of the number.

Original entry on oeis.org

1, 22, 122, 212, 221, 333, 1333, 3133, 3313, 3331, 22333, 23233, 23323, 23332, 32233, 32323, 32332, 33223, 33232, 33322, 122333, 123233, 123323, 123332, 132233, 132323, 132332, 133223, 133232, 133322, 212333, 213233, 213323, 213332
Offset: 1

Views

Author

M. F. Hasler, Sep 22 2014

Keywords

Comments

This sequence lists the same terms as A108571, but ordered first by the largest digit in the number, then by size. This way, a truncation to the first 1, 5, 80, 14381,... terms is this very same sequence for bases b=2, 3, 4, 5, ...

Examples

			In base 2, the only number with this property is a(1) = 1.
In base 3, this property is again satisfied by 1, but also by the 4 additional terms 22, 122, 212 and 221. They are listed "as such" (without conversion from base 3 to base 10) as a(2),...,a(5).
In base 4, there are 75 more terms (involving three digits "3"), listed as a(6),...,a(80).
		

Programs

  • PARI
    a=[];for(d=1,3,n=[10^d\9*d]; for(i=1,#a,t=vector(d+#s=digits(a[i]),j,10^j)~\10;forvec(v=vector(d,j,[1,#t]),c=0;n=concat(n,vector(#t,j,if(setsearch(v,j),d,s[c++]))*t),2));a=concat(a,vecsort(n)));a \\ M. F. Hasler, Sep 25 2014