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.

A232396 Triangular array read by rows: T(n,k) is the number of compositions of n with no two consecutive identical parts that have exactly k parts = 1, n>=0, 0<=k<=ceiling(n/3).

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 1, 2, 1, 3, 3, 1, 3, 8, 3, 6, 9, 7, 1, 7, 20, 10, 2, 14, 27, 25, 5, 18, 52, 39, 14, 1, 30, 77, 78, 26, 3, 45, 132, 133, 60, 8, 66, 213, 240, 117, 24, 1, 107, 334, 421, 232, 54, 4, 157, 562, 716, 450, 127, 12, 245, 872, 1265, 842, 279, 38, 1
Offset: 0

Views

Author

Geoffrey Critzer, Nov 23 2013

Keywords

Examples

			1;
0,  1;
1,  0;
1,  2;
1,  2,  1;
3,  3,  1;
3,  8,  3;
6,  9,  7,  1;
7,  20, 10, 2;
14, 27, 25, 5;
18, 52, 39, 14, 1;
T(7,2) = 7 because we have: 1+2+1+3, 1+2+3+1, 1+3+1+2, 1+3+2+1, 1+5+1, 2+1+3+1, 3+1+2+1.
		

Crossrefs

Row sums give: A003242.

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1, expand(
          add(`if`(j=t, 0, b(n-j, j)*`if`(j=1, x, 1)), j=1..n)))
        end:
    T:= n-> seq(coeff(b(n, 0), x, i), i=0..ceil(n/3)):
    seq(T(n), n=0..20); # Alois P. Heinz, Nov 24 2013
  • Mathematica
    nn=10;CoefficientList[Series[1/(1- u z/(1+ u z) - Sum[z^j/(1+z^j),{j,2,nn}]),{z,0,nn}],{z,u}]//Grid

Formula

G.f.: 1/( 1 - y*x/(1 + y*x) - Sum_{j>=2} x^j/(1 + x^j) ).