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.

A125289 Numbers with unique nonzero digit in decimal representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99, 100, 101, 110, 111, 200, 202, 220, 222, 300, 303, 330, 333, 400, 404, 440, 444, 500, 505, 550, 555, 600, 606, 660, 666, 700, 707, 770, 777, 800, 808, 880, 888, 900, 909
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 26 2006

Keywords

Comments

A043537(a(n)) <= 2.
A043537(A004719(a(n))) = 1: A004719(a(n)) is a repdigit number, see A010785;
also numbers having exactly one partition into digit values of their decimal representations: A061827(a(n))=1.

Crossrefs

Cf. A125292.

Programs

  • PARI
    is(n, base=10) = #Set(select(sign, digits(n, base)))==1 \\ Rémy Sigrist, Mar 28 2020
    
  • PARI
    a(n,base=10) = { for (w=0, oo, if (n<=(base-1)*2^w, my (d=1+(n-1)\2^w, k=2^w+(n-1)%(2^w)); return (d*fromdigits(binary(k), base)), n -= (base-1)*2^w)) } \\ Rémy Sigrist, Mar 28 2020
  • Python
    A125289_list = [n for n in range(10**4) if len(set(str(n))-{'0'})==1]
    # Chai Wah Wu, Jan 04 2015
    
  • Python
    from itertools import count, product, islice
    def A125289_gen(): # generator of terms
        yield from (int(d+''.join(m)) for l in count(0) for d in '123456789' for m in product('0'+d,repeat=l))
    A125289_list = list(islice(A125289_gen(),20)) # Chai Wah Wu, Mar 14 2025