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.

A096568 By rows, array T(n,k)=number of compositions of n with first part k and no equal adjacent parts.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 0, 1, 1, 2, 2, 1, 1, 1, 5, 4, 2, 1, 1, 1, 9, 5, 3, 3, 1, 1, 1, 14, 10, 6, 3, 3, 1, 1, 1, 25, 18, 12, 6, 4, 3, 1, 1, 1, 46, 29, 20, 13, 6, 4, 3, 1, 1, 1, 78, 53, 33, 20, 13, 7, 4, 3, 1, 1, 1, 136, 95, 59, 36, 22, 13, 7, 4, 3, 1, 1, 1, 242, 161, 104, 65, 36, 22, 14, 7, 4, 3, 1, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Jun 27 2004

Keywords

Comments

Row sums are the Carlitz sequence, A003242.

Examples

			Triangle starts
01: 1,
02: 0, 1,
03: 1, 1, 1,
04: 2, 0, 1, 1,
05: 2, 2, 1, 1, 1,
06: 5, 4, 2, 1, 1, 1,
07: 9, 5, 3, 3, 1, 1, 1,
08: 14, 10, 6, 3, 3, 1, 1, 1,
09: 25, 18, 12, 6, 4, 3, 1, 1, 1,
10: 46, 29, 20, 13, 6, 4, 3, 1, 1, 1,
11: 78, 53, 33, 20, 13, 7, 4, 3, 1, 1, 1,
12: 136, 95, 59, 36, 22, 13, 7, 4, 3, 1, 1, 1,
13: 242, 161, 104, 65, 36, 22, 14, 7, 4, 3, 1, 1, 1,
14: 419, 283, 181, 111, 67, 38, 22, 14, 7, 4, 3, 1, 1, 1,
15: 733, 500, 319, 194, 118, 68, 38, 23, 14, 7, 4, 3, 1, 1, 1,
16: 1291, 869, 557, 342, 201, 120, 70, 38, 23, 14, 7, 4, 3, 1, 1, 1,
...
T(6,1)=5 counts the compositions 1+2+1+2, 1+2+3, 1+3+2, 1+4+1, 1+5.
		

Crossrefs

Programs

  • PARI
    R=20;
    M=matrix(R,R);
    T(n,k) = if (n==0, k==0, if (k==0, n==0, M[n,k] ) );
    { for (n=1, R,
        for(k=1, n,
            M[n,k] = sum(j=0,n, T(n-k, j)) - T(n-k, k);
        );
    ); }
    for (n=1,R,for(k=1,n, print1(M[n,k],", ") ); );
    \\ Joerg Arndt, May 21 2013

Formula

Define s(0)=1, T(1, 1)=1 and T(i, j)=0 for j>i. For n>=2 and 1<=k<=n, define s(n)=T(n, 1)+T(n, 2)+...+T(n, n) and T(n, k)=s(n-k)-T(n-k, k).
G.f. for column k: C(x)*x^k/(1+x^k) where C(x) is the g.f. for A003242. - John Tyler Rascoe, May 16 2024

Extensions

Corrected by Joerg Arndt, May 21 2013