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.
%I A371807 #22 Feb 16 2025 08:34:06 %S A371807 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, %T A371807 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, %U A371807 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2 %N A371807 Number of nonoverlapping 666 substrings contained in the decimal expansion of the n-th apocalyptic number. %C A371807 An apocalyptic number is a positive power of 2 containing 666 in its decimal expansion. %C A371807 See A371809 for a variant where overlapping substrings are counted as distinct. %H A371807 Paolo Xausa, <a href="/A371807/b371807.txt">Table of n, a(n) for n = 1..10000</a> %H A371807 Brady Haran and Tony Padilla, <a href="https://www.youtube.com/watch?v=0LkBwCSMsX4">Apocalyptic Numbers</a>, YouTube Numberphile video, 2024. %H A371807 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ApocalypticNumber.html">Apocalyptic Number</a>. %F A371807 a(n) <= A371809(n). %e A371807 a(4) = 2 because the 4th apocalyptic number (2^220) contains two nonoverlapping 666 substrings in its decimal expansion: %e A371807 2^220 = 168499(666)66969149871(666)88442938726917102321526408785780068975640576. %t A371807 Select[StringCount[IntegerString[2^Range[1000]], "666"], # > 0 &] %o A371807 (Python) %o A371807 from itertools import islice %o A371807 def agen(): # generator of terms %o A371807 pow2 = 1 %o A371807 while True: %o A371807 s = str(pow2) %o A371807 if (c := s.count("666")) > 0: yield c %o A371807 pow2 <<= 1 %o A371807 print(list(islice(agen(), 88))) # _Michael S. Branicky_, Apr 07 2024 %Y A371807 Cf. A007356, A371806, A371809. %K A371807 nonn,easy,base %O A371807 1,4 %A A371807 _Paolo Xausa_, Apr 06 2024