The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A085978 A141044 A064284 * A370975 A030409 A030407
KEYWORD
nonn,easy,base
AUTHOR
Paolo Xausa, Apr 06 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 1 14:02 EDT 2024. Contains 373023 sequences. (Running on oeis4.)