OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
In A267371, the first few terms are 0,1,0,0,1, so the first two terms of this sequence are 2, 5.
MATHEMATICA
(* Function a267371[] is defined in A267371 *)
a267374[n_] := Flatten[Position[a267371[n], 1]]
a267374[15] (* Hartmut F. W. Hoft, Mar 23 2024 *)
PROG
(Python)
from itertools import count, islice
def bgen(): # generator of A267371
astr, k, mink = "01", 2, 1
while True:
yield from map(int, astr[:k])
for k in range(1, len(astr)+1):
if astr[1:].count(astr[:k]) == 0:
break
mink = max(mink, k)
astr += astr[:k]
def agen(): # generator of terms
yield from (n for n, an in enumerate(bgen(), 1) if an == 1)
print(list(islice(agen(), 70))) # Michael S. Branicky, Mar 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 13 2016
STATUS
approved