login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214640 A ternary sequence : closed under 1 -> 123, 2 -> 12, 3 -> 2 . Start with 1 . 4
1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2, 1, 2, 1, 2, 3, 1, 2, 2, 1, 2, 3, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
Start: 1
Rules:
1 --> 123
2 --> 12
3 --> 2
-------------
0: (#=1)
1
1: (#=3)
123
2: (#=6)
123122
3: (#=13)
1231221231212
4: (#=29)
12312212312121231221231212312
5: (#=64)
1231221231212123122123121231212312212312121231221231212312212312
MAPLE
S:= proc(n) option remember; `if`(n=0, [1], subs(x=[1, 2, 3][],
y=[1, 2][], z=2, subs(1=x, 2=y, 3=z, S(n-1))))
end:
a:= proc(n) local k;
for k while nops(S(k))<n do od; S(k)[n]
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jul 28 2012
MATHEMATICA
SubstitutionSystem[{1 -> {1, 2, 3}, 2 -> {1, 2}, 3 -> {2}}, {1}, 6] // Last (* Jean-François Alcover, Nov 04 2020 *)
CROSSREFS
Sequence in context: A289585 A128864 A106798 * A224965 A194298 A194306
KEYWORD
nonn,easy
AUTHOR
Philippe Deléham, Jul 23 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)