A063899 Duplicate of A006889.
0, 10, 53, 242, 377, 1491, 1492, 6801, 14007, 100823, 559940, 1148303, 4036338
Offset: 0
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
a(3) = 43 since 2^m contains 3 0's for m starting with 43 (2^43 = 8796093022208) and followed by 53, 61, 69, 70, 83, 87, 89, 90, 93, ...
a = {}; Do[k = 0; While[ Count[ IntegerDigits[2^k], 0] != n, k++ ]; a = Append[a, k], {n, 0, 50} ]; a (* Robert G. Wilson v, Jun 12 2004 *) nn = 100; t = Table[0, {nn}]; found = 0; k = 0; While[found < nn, k++; cnt = Count[IntegerDigits[2^k], 0]; If[cnt <= nn && t[[cnt]] == 0, t[[cnt]] = k; found++]]; t = Join[{0}, t] (* T. D. Noe, Mar 14 2012 *)
A031146(n)=for(k=0, oo, #select(d->!d, digits(2^k))==n&&return(k)) \\ M. F. Hasler, Jun 15 2018
a(7) = 15 because 2^15 = 32768.
a = {}; Do[k = 1; While[ StringPosition[ ToString[2^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
def A063565(n): s, k, k2 = str(n), 1, 2 while True: if s in str(k2): return k k += 1 k2 *= 2 # Chai Wah Wu, Jun 20 2015
a(3)=42 because 2^42(i.e. 4398046511104) is the smallest power of 2 to contain a run of 3 consecutive ones in its decimal form.
a = ""; Do[ a = StringJoin[a, "1"]; b = StringJoin[a, "1"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {} || StringPosition[ ToString[2^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
def A131535(n): s, t, m, k, u = '1'*n, '1'*(n+1), 0, 1, '1' while s not in u or t in u: m += 1 k *= 2 u = str(k) return m # Chai Wah Wu, Jan 28 2020
a(3)=43 because 2^43(i.e. 8796093022208) is the smallest power of 2 to contain a run of 3 consecutive twos in its decimal form.
a = ""; Do[ a = StringJoin[a, "2"]; b = StringJoin[a, "2"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {} || StringPosition[ ToString[2^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
def A131536(n): s, t, m, k, u = '2'*n, '2'*(n+1), 0, 1, '1' while s not in u or t in u: m += 1 k *= 2 u = str(k) return m # Chai Wah Wu, Jan 28 2020
a(3)=43 because 2^43 (i.e. 8796093022208) is the smallest power of 2 to contain a run of 3 consecutive twos in its decimal form.
Table[k = 0; While[! SequenceCount[IntegerDigits[2^k], ConstantArray[2, n]] > 0, k++]; k, {n, 10}] (* Robert Price, May 17 2019 *)
def A259089(n): s, k, k2 = '2'*n, 0, 1 while True: if s in str(k2): return k k += 1 k2 *= 2 # Chai Wah Wu, Jun 19 2015
2^53 = 9007199254740992 contains two adjacent 0's.
Table[k = 0; While[! SequenceCount[IntegerDigits[2^k], Flatten[ConstantArray[IntegerDigits[n], 2]]] > 0, k++]; k, {n, 0, 100}] (* Robert Price, May 17 2019 *)
def A259091(n): s, k, k2 = str(n)*2, 0, 1 while True: if s in str(k2): return k k += 1 k2 *= 2 # Chai Wah Wu, Jun 18 2015
2^242 = 7067388259113537318333190002971674063309935587502475832486424805170479104 contains three adjacent 0's.
Table[k = 0; While[! SequenceCount[IntegerDigits[2^k], Flatten[ConstantArray[IntegerDigits[n], 3]]] > 0, k++]; k, {n, 0, 50}] (* Robert Price, May 17 2019 *)
def A259092(n): s, k, k2 = str(n)*3, 0, 1 while True: if s in str(k2): return k k += 1 k2 *= 2 # Chai Wah Wu, Jun 18 2015
import Data.List (group) a224782 n = a224782_list !! n a224782_list = map (foldl h 0 . group . show) a000079_list where h x zs@(z:_) = if z == '0' then max x $ length zs else x
a(3)=50 because 2^50 (i.e. 1125899906842624) is the smallest power of 2 to contain a run of 3 consecutive nines in its decimal form.
a = ""; Do[ a = StringJoin[a, "9"]; b = StringJoin[a, "9"]; k = 1; While[ StringPosition[ ToString[2^k], a] == {} || StringPosition[ ToString[2^k], b] != {}, k++ ]; Print[k], {n, 1, 10} ]
Comments