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.

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