A371809 Number of 666 substrings contained in the decimal expansion of the n-th apocalyptic number, where overlapping substrings are counted as distinct.
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
Examples
a(8) = 2 because the 8th apocalyptic number (2^243) contains two (overlapping) 666 substrings in its decimal expansion: *** 14134776518227074636666380005943348126619871175004951664972849610340958208. ***
Links
- Paolo Xausa, Table of n, a(n) for n = 1..10000
- Brady Haran and Tony Padilla, Apocalyptic Numbers, YouTube Numberphile video, 2024.
- Eric Weisstein's World of Mathematics, Apocalyptic Number.
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).
Comments