

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

Table of n, a(n) for n=1..5.
Wikipedia, Power of 2


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).
Cf. A045875.
Sequence in context: A242323 A016784 A016808 * A016904 A017696 A211199
Adjacent sequences: A175921 A175922 A175923 * A175925 A175926 A175927


KEYWORD

base,nonn


AUTHOR

Grant Garcia, Oct 18 2010, Oct 20 2010


STATUS

approved



