|
|
A175924
|
|
Smallest power of 2 with n repeated digits.
|
|
0
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The subsequent terms are too large to display.
a(6) and a(7), 2^971 and 2^972, respectively, both of which have 293 digits; a(8), 2^8554, has 2576 digits. a(9), 2^42485, has 12790 digits.
Corresponding exponents of 2 are 0, 16, 24, 41, 220, 971, 972, 8554, 42485, 42486, 271979. [Zak Seidov, Oct 19 2010]
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) is 1 because it is the first power of 2; all integers have at least one digit.
a(2) is 65536 because it is the first power of 2 with two of the same digit in a row.
a(3) is 16777216 because it is the first power of 2 with three of the same digit in a row.
|
|
MATHEMATICA
|
f[n_] := Block[{k = 0}, While[ !MemberQ[Length /@ Split@ IntegerDigits[2^k], n], k++ ]; 2^k]; Table[f[n], {n, 5}] (* Robert G. Wilson v, Oct 21 2010 *)
|
|
PROG
|
(Python)
import math
for N in range(1, 10):
repdigits = 1
n = 0
while repdigits < N:
n += 1
s = str(2 ** n)
prev = ""
repdigits = maxrepdigits = 1
for d in s:
if d == prev: repdigits += 1
else:
maxrepdigits = max(maxrepdigits, repdigits)
repdigits = 1
prev = d
repdigits = max(maxrepdigits, repdigits)
print(N, 2 ** n)
|
|
CROSSREFS
|
Subsequence of A000079 (powers of 2).
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|