OFFSET
1,2
COMMENTS
The terms are not all unique: thus a(491) = a(497) = 14705. - Robert Israel, May 26 2017
LINKS
EXAMPLE
2**22 = 4194304 contains exactly 3 of the same digit (4). Since 22 is the smallest power of 2 to have this, a(3) = 22.
MAPLE
N:= 100: # To get a(1)..a(N)
Agenda:= {$1..N}:
for n from 1 while nops(Agenda) > 0 do
S:= convert(2^n, base, 10);
V:= Vector(10);
for s in S do V[s+1]:= V[s+1]+1 od:
T:= convert(V, set) intersect Agenda;
for t in T do A[t]:= n od:
Agenda:= Agenda minus T;
od:
seq(A[i], i=1..N); # Robert Israel, May 26 2017
PROG
(Python)
def b():
..n = 1
..k = 1
..while k < 50000:
....st = str(2**k)
....if len(st) >= n:
......for a in range(10):
........count = 0
........for i in range(len(st)):
..........if st[i] == str(a):
............count += 1
........if count == n:
..........print(k, end=', ')
..........n += 1
..........k = 0
..........break
......k += 1
....else:
......k += 1
b()
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Jun 16 2014
STATUS
approved