A125289 Numbers with unique nonzero digit in decimal representation.
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
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..9207
- Eric Weisstein's World of Mathematics, Repeating Decimal
- Eric Weisstein's World of Mathematics, Repdigit
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
Comments