cp's OEIS Frontend

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.

A371809 Number of 666 substrings contained in the decimal expansion of the n-th apocalyptic number, where overlapping substrings are counted as distinct.

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