|
|
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
|
|
|
FORMULA
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|