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.

A168443 Triangle, T(n,k) = number of compositions a(1),...,a(k) of n, such that a(i+1) <= a(i) + 1 for 1 <= i < k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 3, 4, 4, 1, 1, 3, 6, 7, 5, 1, 1, 4, 7, 11, 11, 6, 1, 1, 4, 9, 15, 19, 16, 7, 1, 1, 5, 11, 19, 29, 31, 22, 8, 1, 1, 5, 13, 25, 39, 52, 48, 29, 9, 1, 1, 6, 15, 30, 53, 76, 88, 71, 37, 10, 1, 1, 6, 18, 37, 67, 107, 140, 142, 101, 46, 11, 1, 1, 7, 20, 44, 84, 143, 207, 245, 220, 139, 56, 12, 1
Offset: 1

Views

Author

Vladeta Jovovic, Nov 25 2009

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  1, 1;
  1, 2, 1;
  1, 2, 3,  1;
  1, 3, 4,  4,  1;
  1, 3, 6,  7,  5,  1;
  1, 4, 7, 11, 11,  6, 1;
  1, 4, 9, 15, 19, 16, 7, 1;
  ...
		

Crossrefs

Cf. A003116 (row sums), A168396.

Programs

  • Maple
    b:= proc(n, k) option remember; expand(`if`(n=0, 1,
          x*add(b(n-j, j), j=1..min(n, k+1))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n$2)):
    seq(T(n), n=1..14);  # Alois P. Heinz, Jan 21 2022
  • Mathematica
    b[n_, k_] := b[n, k] = Expand[If[n == 0, 1,
         x*Sum[b[n - j, j], {j, 1, Min[n, k + 1]}]]];
    T[n_] := Rest@CoefficientList[b[n, n], x];
    Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)