login
A371809
Number of 666 substrings contained in the decimal expansion of the n-th apocalyptic number, where overlapping substrings are counted as distinct.
3
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,4
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.
LINKS
Brady Haran and Tony Padilla, Apocalyptic Numbers, YouTube Numberphile video, 2024.
Eric Weisstein's World of Mathematics, Apocalyptic Number.
FORMULA
a(n) >= A371807(n).
EXAMPLE
a(8) = 2 because the 8th apocalyptic number (2^243) contains two (overlapping) 666 substrings in its decimal expansion:
***
14134776518227074636666380005943348126619871175004951664972849610340958208.
***
MATHEMATICA
Select[StringCount[IntegerString[2^Range[1000]], "666", Overlaps->True], # > 0 &]
PROG
(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
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Paolo Xausa, Apr 06 2024
STATUS
approved