login
Indices of a in the sequence closed under a -> abc, b -> ab, c -> b . Start with a.
4

%I #18 Nov 04 2020 05:54:49

%S 1,4,7,10,12,14,17,20,23,25,28,30,33,36,39,41,43,46,49,52,54,57,60,63,

%T 65,68,71,74,76,78,81,84,87,89,92,94,97,100,103,105,107,110,113,116,

%U 118,121,124,127,129,131,134,137,140,142,145,148,151,153,155,158

%N Indices of a in the sequence closed under a -> abc, b -> ab, c -> b . Start with a.

%C Indices of 1 in A214640.

%H Alois P. Heinz, <a href="/A214641/b214641.txt">Table of n, a(n) for n = 1..1000</a>

%e a -> abc -> abcabb -> abcabbabcabab -> abcabbabcabababcabbabcababcab -> ...

%p S:= proc(n) option remember; `if`(n=0, [1], subs(x=[1, 2, 3][],

%p y=[1, 2][], z=2, subs(1=x, 2=y, 3=z, S(n-1))))

%p end:

%p a:= proc(n) option remember; local i, k; i:=1;

%p for k from 1+`if`(n=1, 0, a(n-1)) do

%p while nops(S(i))<k do i:=i+1 od;

%p if S(i)[k] = 1 then return k fi

%p od

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Jul 28 2012

%t SubstitutionSystem[{"a" -> {"a", "b", "c"}, "b" -> {"a", "b"}, "c" -> {"b"}}, {"a"}, 7] // Last // Position[#, "a"]& // Flatten (* _Jean-François Alcover_, Nov 04 2020 *)

%Y Cf. A214640, A214642, A214644.

%K nonn

%O 1,2

%A _Philippe Deléham_, Jul 23 2012