|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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]]
|
|
PROG
|
(Python)
from itertools import count, islice
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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|