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.

A143361 Triangle read by rows: T(n,k) is the number of 010-avoiding binary words of length n containing k 00 subwords (0<=k<=n-1).

Original entry on oeis.org

2, 3, 1, 4, 2, 1, 6, 3, 2, 1, 9, 6, 3, 2, 1, 13, 11, 7, 3, 2, 1, 19, 18, 14, 8, 3, 2, 1, 28, 30, 24, 17, 9, 3, 2, 1, 41, 50, 43, 30, 20, 10, 3, 2, 1, 60, 81, 77, 57, 36, 23, 11, 3, 2, 1, 88, 130, 132, 108, 72, 42, 26, 12, 3, 2, 1, 129, 208, 224, 193, 143, 88, 48, 29, 13, 3, 2, 1
Offset: 1

Views

Author

Emeric Deutsch, Aug 15 2008

Keywords

Comments

Sum of entries in row n = A005251(n+3).
T(n,0) = A000930(n+2).
Sum(k*T(n,k), k=0..n-1) = A118430(n+1).

Examples

			T(5,2)=3 because we have 00011, 10001 and 11000.
Triangle starts:
2;
3,   1;
4,   2, 1;
6,   3, 2, 1;
9,   6, 3, 2, 1;
13, 11, 7, 3, 2, 1;
		

Crossrefs

Programs

  • Maple
    G:=(1+z-t*z+z^2)/(1-z-t*z+t*z^2-z^3)-1: Gser:=simplify(series(G,z=0,14)): for n to 12 do P[n]:=sort(coeff(Gser,z,n)) end do: for n to 12 do seq(coeff(P[n], t,j),j=0..n-1) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<3,
          expand(b(n-1, i+1) +b(n-1, i)*`if`(i=2, x, 1)), b(n-1, 1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 1)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Dec 18 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<3, Expand[b[n-1, i+1] + b[n-1, i]*If[i == 2, x, 1]], b[n-1, 1]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 1]]; Table[T[n], {n, 1, 15}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)

Formula

G.f.: G(t,z) = (1+z-tz+z^2)/(1-z-tz+tz^2-z^3)-1.