cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A214640 A ternary sequence : closed under 1 -> 123, 2 -> 12, 3 -> 2 . Start with 1 .

Original entry on oeis.org

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
Offset: 1

Views

Author

Philippe Deléham, Jul 23 2012

Keywords

Examples

			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
		

Crossrefs

Programs

  • 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))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 *)