login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A371807
Number of nonoverlapping 666 substrings contained in the decimal expansion of the n-th apocalyptic number.
3
1, 1, 1, 2, 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, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 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, 1, 1, 1, 1, 2
OFFSET
1,4
COMMENTS
An apocalyptic number is a positive power of 2 containing 666 in its decimal expansion.
See A371809 for a variant where overlapping substrings are counted as distinct.
LINKS
Brady Haran and Tony Padilla, Apocalyptic Numbers, YouTube Numberphile video, 2024.
Eric Weisstein's World of Mathematics, Apocalyptic Number.
FORMULA
a(n) <= A371809(n).
EXAMPLE
a(4) = 2 because the 4th apocalyptic number (2^220) contains two nonoverlapping 666 substrings in its decimal expansion:
2^220 = 168499(666)66969149871(666)88442938726917102321526408785780068975640576.
MATHEMATICA
Select[StringCount[IntegerString[2^Range[1000]], "666"], # > 0 &]
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
pow2 = 1
while True:
s = str(pow2)
if (c := s.count("666")) > 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