login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #20 Nov 04 2020 05:49:49

%S 3,9,16,22,27,32,38,45,51,56,62,67,73,80,86,91,96,102,109,115,120,126,

%T 133,139,144,150,157,163,168,173,179,186,192,197,203,208,214,221,227,

%U 232,237,243,250,256,261,267,274,280,285,290,296,303,309,314,320,327

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

%C Indices of 3 in A214640.

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

%e Start: a

%e Rules:

%e a --> abc

%e b --> ab

%e c --> b

%e -------------

%e 0: (#=1)

%e a

%e 1: (#=3)

%e abc

%e 2: (#=6)

%e abcabb

%e 3: (#=13)

%e abcabbabcabab

%e 4: (#=29)

%e abcabbabcabababcabbabcababcab

%e 5: (#=64)

%e abcabbabcabababcabbabcababcababcabbabcabababcabbabcababcabbabcab

%e 3 9 16 22 27 ... (positions of 'c')

%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] = 3 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"}, 8] // Last // Position[#, "c"]& // Flatten (* _Jean-François Alcover_, Nov 04 2020 *)

%Y Cf. A214640, A214641, A214642.

%K nonn,easy

%O 1,1

%A _Philippe Deléham_, Jul 24 2012