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-3 of 3 results.

A371806 Exponents k > 0 of powers of 2 such that the decimal expansion of 2^k contains more than one nonoverlapping 666 substring.

Original entry on oeis.org

220, 222, 529, 624, 648, 702, 714, 844, 846, 850, 859, 924, 925, 929, 931, 979, 981, 983, 1062, 1088, 1133, 1135, 1219, 1230, 1241, 1259, 1310, 1343, 1349, 1384, 1394, 1467, 1472, 1495, 1503, 1524, 1550, 1589, 1627, 1631, 1642, 1652, 1656, 1663, 1679, 1744, 1751
Offset: 1

Views

Author

Paolo Xausa, Apr 06 2024

Keywords

Comments

A positive power of 2 containing 666 in its decimal expansion is called an apocalyptic number.
See A371808 for a variant where overlapping substrings are counted as distinct.

Examples

			220 is a term because 2^220 contains more than one nonoverlapping 666 substring in its decimal expansion:
2^220 = 168499(666)66969149871(666)88442938726917102321526408785780068975640576.
		

Crossrefs

Subsequence of A007356 and of A371808.
Cf. A371807.

Programs

  • Mathematica
    Select[Range[2000], StringCount[IntegerString[2^#], "666"] > 1 &]
  • Python
    def ok(n): return str(1< 1
    print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Apr 07 2024

A371809 Number of 666 substrings contained in the decimal expansion of the n-th apocalyptic number, where overlapping substrings are counted as distinct.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 2, 3
Offset: 1

Views

Author

Paolo Xausa, Apr 06 2024

Keywords

Comments

An apocalyptic number is a positive power of 2 containing 666 in its decimal expansion.
See A371807 for a variant counting only nonoverlapping substrings.

Examples

			a(8) = 2 because the 8th apocalyptic number (2^243) contains two (overlapping) 666 substrings in its decimal expansion:
                   ***
14134776518227074636666380005943348126619871175004951664972849610340958208.
                    ***
		

Crossrefs

Programs

  • Mathematica
    Select[StringCount[IntegerString[2^Range[1000]], "666", Overlaps->True], # > 0 &]
  • Python
    from itertools import islice
    def agen(): # generator of terms
        pow2 = 1
        while True:
            s = str(pow2)
            c = sum(1 for i in range(len(s)-2) if s[i:i+3] == "666")
            if c > 0: yield c
            pow2 <<= 1
    print(list(islice(agen(), 88))) # Michael S. Branicky, Apr 07 2024

Formula

a(n) >= A371807(n).

A372680 Integers k such that 2^k contains all powers of 2 not exceeding k as substrings.

Original entry on oeis.org

124, 192, 322, 808, 830, 957, 1757, 4067, 5489, 6616, 6724, 6794, 7065, 7727, 7728, 7736, 8253, 8938, 9438, 9989, 10194, 10195, 10271, 10350, 10389, 10397, 10445, 10475, 10611, 10835, 11107, 11500, 11606, 11758, 11835, 12089, 12304, 12398, 12501, 12548, 12645, 12694, 12695, 12734, 12820
Offset: 1

Views

Author

Bryle Morga, May 10 2024

Keywords

Comments

It is unknown whether this sequence contains infinitely many terms.

Examples

			124 is a term; 2^124 = 21267647932558653966460912964485513216 contains 2, 4, 8, 16, 32, 64 as substrings.
		

Crossrefs

Programs

  • Python
    def f(m):
      a = str(2**m)
      for i in range(0, m.bit_length()):
        if str(2**i) not in a:
          return 0
      return 1
    def a(n):
      m = 0
      i = 0
      while i != n:
        m += 1
        i += f(m)
      return m
Showing 1-3 of 3 results.