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.

A211029 Triangle read by rows in which row n lists the binary words of length n over the alphabet {1,2} with no initial repeats.

Original entry on oeis.org

1, 2, 12, 21, 121, 122, 211, 212, 1211, 1221, 1222, 2111, 2112, 2122, 12111, 12112, 12211, 12212, 12221, 12222, 21111, 21112, 21121, 21122, 21221, 21222, 121111, 121112, 121122, 122111, 122112, 122121, 122211, 122212, 122221, 122222, 211111, 211112
Offset: 1

Views

Author

Omar E. Pol, Nov 29 2012

Keywords

Comments

As usual in the OEIS, binary alphabets are encoded with {1,2} over the alphabet {0,1} the entries contain nonzero "numbers" beginning with 0.

Examples

			The fourth row of triangle of binary sequences is
0100, 0110, 0111, 1000, 1001, 1011 (see section example of A122536) therefore the fourth row of this triangle is
1211, 1221, 1222, 2111, 2112, 2122.
The first six rows of triangle are:
1, 2;
12, 21;
121, 122, 211, 212;
1211, 1221, 1222, 2111, 2112, 2122;
12111, 12112, 12211, 12212, 12221, 12222, 21111, 21112, 21121, 21122, 21221, 21222;
121111, 121112, 121122, 122111, 122112, 122121, 122211, 122212, 122221, 122222, 211111, 211112, 211121, 211122, 211212, 211221, 211222, 212211, 212221, 212222;
		

Crossrefs

Row n has length A122536(n).

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n=0, [[]], map(x->
          [[x[], 1], [x[], 2]][], s(n-1))) end:
    T:= proc(n) map(x-> parse(cat(x[])), select(proc(l) local i;
          for i to iquo(nops(l), 2) do if l[1..i]=l[i+1..2*i]
          then return false fi od; true end, s(n)))[] end:
    seq(T(n), n=1..7);  # Alois P. Heinz, Dec 02 2012

Extensions

More terms and name improved by R. J. Mathar, Nov 30 2012