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.

Showing 1-1 of 1 results.

A182485 Number of partitions of n into exactly k different parts with distinct multiplicities; triangle T(n,k), n>=0, 0<=k<=max{i:A000292(i)<=n}, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 2, 0, 3, 1, 0, 2, 3, 0, 4, 3, 0, 2, 8, 0, 4, 9, 0, 3, 12, 0, 4, 16, 1, 0, 2, 22, 4, 0, 6, 20, 5, 0, 2, 31, 12, 0, 4, 35, 16, 0, 4, 34, 24, 0, 5, 44, 33, 0, 2, 51, 52, 0, 6, 53, 57, 0, 2, 62, 89, 0, 6, 65, 100, 1, 0, 4, 68, 131, 5, 0, 4, 87
Offset: 0

Views

Author

Alois P. Heinz, May 01 2012

Keywords

Examples

			T(0,0) = 1: [].
T(1,1) = 1: [1].
T(2,1) = 2: [1,1], [2].
T(4,1) = 3: [1,1,1,1], [2,2], [4].
T(4,2) = 1: [2,1,1]; part 2 occurs once and part 1 occurs twice.
T(5,2) = 3: [2,1,1,1], [2,2,1], [3,1,1].
T(7,2) = 8: [2,1,1,1,1,1], [2,2,1,1,1], [2,2,2,1], [3,1,1,1,1], [3,2,2], [3,3,1], [4,1,1,1], [5,1,1].
T(10,1) = 4: [1,1,1,1,1,1,1,1,1,1], [2,2,2,2,2], [5,5], [10].
T(10,3) = 1: [3,2,2,1,1,1].
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 2;
  0, 2;
  0, 3,  1;
  0, 2,  3;
  0, 4,  3;
  0, 2,  8;
  0, 4,  9;
  0, 3, 12;
  0, 4, 16, 1;
		

Crossrefs

Row sums give: A098859.
First row with length (t+1): A000292(t).
Cf. A242896 (the same for compositions):

Programs

  • Maple
    b:= proc(n, i, t, s) option remember;
          `if`(nops(s)>t, 0, `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, t, s)+
          add(`if`(j in s, 0, b(n-i*j, i-1, t, s union {j})), j=1..n/i))))
        end:
    g:= proc(n) local i; for i while i*(i+1)*(i+2)/6<=n do od; i-1 end:
    T:= n-> seq(b(n, n, k, {}) -b(n, n, k-1, {}), k=0..g(n)):
    seq(T(n), n=0..30);
  • Mathematica
    b[n_, i_, t_, s_] := b[n, i, t, s] = If[Length[s] > t, 0, If[n == 0, 1, If[i < 1, 0, b[n, i-1, t, s] + Sum[If[MemberQ[s, j], 0, b[n-i*j, i-1, t, s ~Union~ {j}]], {j, 1, n/i}]]]]; g[n_] := Module[{i}, For[ i = 1, i*(i+1)*(i+2)/6 <= n , i++]; i-1 ]; t[n_] := Table [b[n, n, k, {}] - b[n, n, k-1, {}], {k, 0, g[n]}]; Table [t[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Dec 19 2013, translated from Maple *)
Showing 1-1 of 1 results.