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.

A235998 Triangle read by rows: T(n,k) is the number of compositions of n having k distinct parts (n>=1, 1<=k<=floor((sqrt(1+8*n)-1)/2)).

Original entry on oeis.org

1, 2, 2, 2, 3, 5, 2, 14, 4, 22, 6, 2, 44, 18, 4, 68, 56, 3, 107, 146, 4, 172, 312, 24, 2, 261, 677, 84, 6, 396, 1358, 288, 2, 606, 2666, 822, 4, 950, 5012, 2226, 4, 1414, 9542, 5304, 120, 5, 2238, 17531, 12514, 480, 2, 3418, 32412, 27904, 1800, 6, 5411, 58995, 61080, 5580
Offset: 1

Views

Author

Omar E. Pol, Jan 19 2014

Keywords

Comments

Row n has length A003056(n) hence the first element of column k is in row A000217(k).
The equivalent sequence for partitions is A116608.
For the number of compositions of n see A011782.
For the connection to overcompositions see A235999.
Row sums give A011782(n), n >= 1.
First column is A000005, second column is A131661.
T(k*(k+1)/2,k) = T(A000217(k),k) = A000142(k) = k!. - Alois P. Heinz, Jan 20 2014

Examples

			Triangle begins:
  1;
  2;
  2,    2;
  3,    5;
  2,   14;
  4,   22,     6;
  2,   44,    18;
  4,   68,    56;
  3,  107,   146;
  4,  172,   312,    24;
  2,  261,   677,    84;
  6,  396,  1358,   288;
  2,  606,  2666,   822;
  4,  950,  5012,  2226;
  4, 1414,  9542,  5304,  120;
  5, 2238, 17531, 12514,  480;
  2, 3418, 32412, 27904, 1800;
  6, 5411, 58995, 61080, 5580;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          expand(add(b(n-i*j, i-1, p+j)/j!*`if`(j=0, 1, x), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2, 0)):
    seq(T(n), n=1..25); # Alois P. Heinz, Jan 20 2014, revised May 25 2014
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n==0, p!, If[i<1, 0, Sum[b[n-i*j, i-1, p+ j]/j!*If[j==0, 1, x], {j, 0, n/i}]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, n, 0]]; Table[T[n], {n, 1, 25}] // Flatten (* Jean-François Alcover, Dec 10 2015, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jan 19 2014