login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A371440
Count of iteration steps for the iterates in A267371 that end in 1.
1
0, 2, 5, 9, 12, 14, 17, 20, 25, 28, 32, 36, 39, 43, 46, 49, 52, 56, 59, 61, 64, 67, 71, 74, 76, 80, 83, 87, 90, 92, 95, 99, 102, 106, 109, 111, 114, 117, 119, 123, 126, 130, 133, 138, 140, 143, 147, 150, 156, 159, 163, 166, 168, 171, 174, 179, 183, 186, 190, 193, 195, 198
OFFSET
0,2
COMMENTS
Conjecture: If iterate m terminates with prefix s ending in 1 then the subsequent iterate of A267371 is terminated by prefix s0.
LINKS
EXAMPLE
a(0) = 0 since the initial string for the iteration process is 01.
a(2) = 5 since the first 5 prefixes are 0, 01, 010, 0100 and 0100101 determining the iterate 0100101001000100101 of length 19. The next prefix in the iteration process is 01001010.
MATHEMATICA
(* function preLo[ ] is defined in A267371 *)
lastChar[n_] := Map[StringTake[Last[#], -1]&, NestList[{preLo[#], StringJoin[#[[2]], StringTake[#[[2]], preLo[#]]]}&, {1, "01"}, n]]a371440[n_] := Flatten[Position[lastChar[n], "1"]-1]a371440[200]
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
astr, k, mink = "01", 2, 1
for i in count(0):
if astr[-1] == "1": yield i
for k in range(mink, len(astr)+1):
if astr[1:].count(astr[:k]) == 0:
break
mink = max(mink, k)
astr += astr[:k]
print(list(islice(agen(), 62))) # Michael S. Branicky, Mar 23 2024
CROSSREFS
Cf. A267371.
Sequence in context: A099434 A191104 A287387 * A287409 A279171 A297465
KEYWORD
nonn
AUTHOR
Hartmut F. W. Hoft, Mar 23 2024
STATUS
approved