login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A360656
Least k such that the decimal representation of 2^k contains all possible n-digit strings.
1
68, 975, 16963, 239697, 2994863
OFFSET
1,1
EXAMPLE
2^68 = 295147905179352825856 is the least power of 2 containing all ten decimal digits, so a(1) = 68 = A171744(1).
2^975 is the least power of 2 containing all 100 two-digit strings, so a(2) = 975.
PROG
(Python)
def a(n, starte=0):
e, p2, t = starte, 2**starte, 10**n
while True:
s2, ss = str(p2), set()
for i in range(len(s2)-n+1):
ss.add(s2[i:i+n])
if len(ss) == t:
return e
e += 1
p2 *= 2
print([a(n) for n in range(1, 4)]) # Michael S. Branicky, Feb 22 2023
CROSSREFS
Sequence in context: A250144 A250338 A223374 * A254645 A281049 A264316
KEYWORD
nonn,base,more
AUTHOR
Hans Havermann, Feb 15 2023
STATUS
approved