cp's OEIS Frontend

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.

Showing 1-10 of 14 results. Next

A063899 Duplicate of A006889.

Original entry on oeis.org

0, 10, 53, 242, 377, 1491, 1492, 6801, 14007, 100823, 559940, 1148303, 4036338
Offset: 0

Views

Author

Keywords

A031146 Exponent of the least power of 2 having exactly n zeros in its decimal representation.

Original entry on oeis.org

0, 10, 42, 43, 79, 88, 100, 102, 189, 198, 242, 250, 252, 263, 305, 262, 370, 306, 368, 383, 447, 464, 496, 672, 466, 557, 630, 629, 628, 654, 657, 746, 771, 798, 908, 913, 917, 906, 905, 1012, 1113, 988, 1020, 989, 1044, 1114, 1120, 1118, 1221, 1218, 1255
Offset: 0

Views

Author

Keywords

Examples

			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, ...
		

Crossrefs

Cf. A063555 (analog for 3^k), A063575 (for 4^k), A063585 (for 5^k), A063596 (for 6^k), A063606 (for 7^k), A063616 (for 8^k), A063626 (for 9^k).

Programs

  • Mathematica
    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 *)
  • PARI
    A031146(n)=for(k=0, oo, #select(d->!d, digits(2^k))==n&&return(k)) \\ M. F. Hasler, Jun 15 2018

Extensions

More terms from Erich Friedman
Definition clarified by Joerg Arndt, Sep 27 2016

A063565 Smallest positive number k such that 2^k contains n.

Original entry on oeis.org

10, 4, 1, 5, 2, 8, 4, 15, 3, 12, 10, 40, 7, 17, 18, 21, 4, 27, 30, 13, 11, 18, 43, 41, 10, 8, 18, 15, 7, 32, 22, 17, 5, 25, 27, 25, 16, 30, 14, 42, 12, 22, 19, 22, 18, 28, 42, 31, 11, 32, 52, 9, 19, 16, 25, 16, 8, 20, 33, 33, 23, 58, 18, 14, 6, 16, 46, 24, 15, 34, 29, 21, 17, 30
Offset: 0

Views

Author

Robert G. Wilson v, Aug 10 2001

Keywords

Examples

			a(7) = 15 because 2^15 = 32768.
		

Crossrefs

Apart from initial term, a duplicate of A030000.

Programs

  • Mathematica
    a = {}; Do[k = 1; While[ StringPosition[ ToString[2^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
  • Python
    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

Extensions

More terms from Hans Havermann

A131535 Exponent of least power of 2 having exactly n consecutive 1's in its decimal representation.

Original entry on oeis.org

1, 0, 40, 42, 313, 485, 1841, 8923, 8554, 81783, 165742, 1371683, 1727601, 9386566, 28190643, 63416789
Offset: 0

Views

Author

Shyam Sunder Gupta, Aug 26 2007

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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} ]
  • Python
    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

Extensions

2 more terms from Sean A. Irvine, Jul 19 2010
a(13)-a(14) from Lars Blomberg, Jan 24 2013
a(15) from Bert Dobbelaere, Feb 25 2019
a(0) added and a(1) corrected by Chai Wah Wu, Jan 28 2020

A131536 Exponent of least power of 2 having exactly n consecutive 2's in its decimal representation.

Original entry on oeis.org

0, 1, 51, 43, 692, 314, 2354, 8555, 13326, 81784, 279272, 865356, 1727608, 1727602, 23157022, 63416790
Offset: 0

Views

Author

Shyam Sunder Gupta, Aug 26 2007

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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} ]
  • Python
    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

Extensions

3 more terms from Sean A. Irvine, Jul 19 2010
a(14) from Lars Blomberg, Jan 24 2013
a(15) from Bert Dobbelaere, Feb 25 2019
a(0) from Chai Wah Wu, Jan 28 2020

A259089 Least k such that 2^k has at least n consecutive 2's in its decimal representation.

Original entry on oeis.org

0, 1, 43, 43, 314, 314, 2354, 8555, 13326, 81784, 279272, 865356, 1727602, 1727602
Offset: 0

Views

Author

N. J. A. Sloane, Jun 18 2015

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[! SequenceCount[IntegerDigits[2^k], ConstantArray[2, n]] > 0, k++]; k, {n, 10}] (* Robert Price, May 17 2019 *)
  • Python
    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

Extensions

a(7)-a(13) from Chai Wah Wu, Jun 20 2015
Definition corrected by Manfred Scheucher, Jun 23 2015
a(0) prepended by Chai Wah Wu, Jan 28 2020

A259091 Smallest k such that 2^k contains two adjacent copies of n in its decimal expansion.

Original entry on oeis.org

53, 40, 43, 25, 18, 16, 46, 24, 19, 33, 378, 313, 170, 374, 361, 359, 64, 34, 507, 151, 348, 246, 314, 284, 349, 314, 261, 151, 385, 166, 156, 364, 65, 219, 371, 359, 503, 148, 155, 352, 349, 308, 247, 255, 192, 387, 165, 149, 171, 150, 210, 155, 209, 101, 505
Offset: 0

Views

Author

N. J. A. Sloane, Jun 18 2015

Keywords

Comments

The multi-digit generalization of A171132. - R. J. Mathar, Jul 06 2015

Examples

			2^53 = 9007199254740992 contains two adjacent 0's.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[! SequenceCount[IntegerDigits[2^k], Flatten[ConstantArray[IntegerDigits[n], 2]]] > 0, k++]; k, {n, 0, 100}] (* Robert Price, May 17 2019 *)
  • Python
    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

Extensions

More terms from Chai Wah Wu, Jun 18 2015

A259092 Smallest k such that 2^k contains three adjacent copies of n in its decimal expansion.

Original entry on oeis.org

242, 42, 43, 83, 44, 41, 157, 24, 39, 50, 949, 1841, 3661, 1798, 1701, 1161, 1806, 391, 1890, 2053, 950, 1164, 2354, 1807, 3816, 1800, 1799, 818, 1702, 2115, 904, 1798, 1807, 2270, 392, 1699, 3022, 394, 2054, 1758, 1804, 2300, 2720, 2403, 3396, 1133, 1808, 3820
Offset: 0

Views

Author

N. J. A. Sloane, Jun 18 2015

Keywords

Comments

The multi-digit generalization of A171242. - R. J. Mathar, Jul 06 2015

Examples

			2^242 = 7067388259113537318333190002971674063309935587502475832486424805170479104 contains three adjacent 0's.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[! SequenceCount[IntegerDigits[2^k], Flatten[ConstantArray[IntegerDigits[n], 3]]] > 0, k++]; k, {n, 0, 50}] (* Robert Price, May 17 2019 *)
  • Python
    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

Extensions

More terms from Chai Wah Wu, Jun 18 2015

A224782 Length of longest run of consecutive zeros in decimal representation of 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 30 2013

Keywords

Comments

a(n) <= A027870(n);
a(A007377(n)) = 0;
a(A006889(n)) = n and a(m) <> n for m < A006889(n).

References

  • Julian Havil, Impossible?: Surprising Solutions to Counterintuitive Conundrums, Princeton University Press 2008, chapter 15, p. 176ff

Programs

  • Haskell
    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

A131543 Exponent of least power of 2 having exactly n consecutive 9's in its decimal representation.

Original entry on oeis.org

0, 12, 33, 50, 421, 422, 2187, 15554, 42483, 42485, 42486, 1522085, 2662514, 6855863, 6855865
Offset: 0

Views

Author

Shyam Sunder Gupta, Aug 26 2007

Keywords

Comments

Similarly to A006889, the least power of 2 to contain at least n consecutive 9's will always contain exactly n consecutive 9's. The previous power of two will contain exactly n-1 consecutive 9's preceded by a 4. - Paul Geneau de Lamarlière, Jul 20 2024
No more terms < 28*10^6.

Examples

			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.
		

Crossrefs

Cf. A006889.

Programs

  • Mathematica
    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} ]

Extensions

a(11) from Sean A. Irvine, May 31 2010
a(12)-a(14) from Lars Blomberg, Jan 24 2013
a(0)=0 prepended by Paul Geneau de Lamarlière, Jul 20 2024
Showing 1-10 of 14 results. Next