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.

A156042 A(n,k) for n >= k in triangular ordering, where A(n,k) is the number of compositions (ordered partitions) of n into k parts, with the first part greater than or equal to all other parts.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 3, 6, 11, 1, 3, 8, 17, 32, 1, 4, 11, 26, 54, 102, 1, 4, 13, 35, 82, 172, 331, 1, 5, 17, 48, 120, 272, 567, 1101, 1, 5, 20, 63, 170, 412, 918, 1906, 3724, 1, 6, 24, 81, 235, 607, 1434, 3152, 6518, 12782, 1, 6, 28, 102, 317, 872, 2180, 5049, 10978, 22616, 44444
Offset: 1

Views

Author

Jack W Grahl, Feb 02 2009

Keywords

Comments

The value is smaller than the number of compositions (ordered partitions) of n into k parts and at least the number of (unordered) partitions.

Examples

			A(5,3) = 8 and the 8 compositions of 5 into 3 parts with first part maximal are:
[5,0,0], [4,1,0], [4,0,1], [3,2,0], [3,0,2], [3,1,1], [2,2,1], [2,1,2].
1
1  2
1  2  4
1  3  6  11
1  3  8  17  32
1  4  11 26  54  102
		

Crossrefs

A156041 is the whole of the square. A156043 is the diagonal. See also A156039 and A156040.

Programs

  • Maple
    b:= proc(n,i,m) option remember;
          if n<0 then 0
        elif n=0 then 1
        elif i=1 then `if`(n<=m, 1, 0)
        else add(b(n-k, i-1, m), k=0..m)
          fi
        end:
    A:= (n,k)-> add(b(n-m, k-1, m), m=ceil(n/k)..n):
    seq(seq(A(n,k), k=1..n), n=1..12); # Alois P. Heinz, Jun 14 2009
  • Mathematica
    nn=10; Table[Table[Coefficient[Series[Sum[x^i((1-x^(i+1))/(1-x))^(k-1), {i, 0, n}], {x, 0, nn}], x^n], {k, 1, n}], {n, 1, nn}]//Grid (* Geoffrey Critzer, Jul 15 2013 *)

Extensions

More terms from Alois P. Heinz, Jun 14 2009