login
A267374
Positions of 1's in A267371.
3
2, 5, 7, 10, 14, 17, 19, 21, 24, 26, 29, 32, 34, 38, 41, 43, 46, 51, 54, 56, 59, 63, 65, 68, 70, 73, 77, 80, 83, 85, 88, 92, 96, 99, 101, 104, 108, 111, 113, 115, 118, 120, 123, 127, 130, 132, 135, 138, 140, 143, 147, 150, 152, 154, 157, 159, 162, 165, 167, 170, 172, 175, 179, 182, 184, 186, 189, 191, 194, 197
OFFSET
1,1
LINKS
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
Sequence in context: A288209 A071113 A071704 * A267379 A287403 A287399
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 13 2016
STATUS
approved