login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243972 Least number k such that 2^k contains exactly n identical digits. 3
1, 16, 22, 23, 53, 70, 74, 93, 122, 147, 156, 167, 168, 222, 214, 221, 283, 315, 311, 312, 313, 314, 426, 466, 427, 474, 439, 563, 630, 576, 554, 575, 626, 627, 793, 722, 809, 766, 861, 889, 925, 893, 989, 890, 1077, 891, 983, 892, 1130, 1128, 1135, 1134, 1217, 1129, 1238 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A123662 A065778 A305944 * A091118 A294125 A360735
KEYWORD
nonn,base
AUTHOR
Derek Orr, Jun 16 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 18:16 EDT 2024. Contains 374285 sequences. (Running on oeis4.)