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-9 of 9 results.

A242882 Number of compositions of n into parts with distinct multiplicities.

Original entry on oeis.org

1, 1, 2, 2, 6, 12, 16, 40, 60, 82, 216, 538, 788, 2034, 3740, 6320, 13336, 27498, 42936, 93534, 173520, 351374, 734650, 1592952, 3033194, 6310640, 12506972, 25296110, 49709476, 101546612, 195037028, 391548336, 764947954, 1527004522, 2953533640, 5946359758
Offset: 0

Views

Author

Alois P. Heinz, May 25 2014

Keywords

Examples

			a(0) = 1: the empty composition.
a(1) = 1: [1].
a(2) = 2: [1,1], [2].
a(3) = 2: [1,1,1], [3].
a(4) = 6: [1,1,1,1], [1,1,2], [1,2,1], [2,1,1], [2,2], [4].
a(5) = 12: [1,1,1,1,1], [1,1,1,2], [1,1,2,1], [1,2,1,1], [2,1,1,1], [1,2,2], [2,1,2], [2,2,1], [1,1,3], [1,3,1], [3,1,1], [5].
		

Crossrefs

Row sums of A242887 and of A242896.
Cf. A098859 (the same for partitions).

Programs

  • Maple
    b:= proc(n, i, s) option remember; `if`(n=0, add(j, j=s)!,
          `if`(i<1, 0, add(`if`(j>0 and j in s, 0,
          b(n-i*j, i-1, `if`(j=0, s, s union {j}))/j!), j=0..n/i)))
        end:
    a:= n-> b(n$2, {}):
    seq(a(n), n=0..45);
  • Mathematica
    b[n_, i_, s_] := b[n, i, s] = If[n == 0, Sum[j, {j, s}]!, If[i < 1, 0, Sum[If[j > 0 && MemberQ[s, j], 0, b[n - i*j, i - 1, If[j == 0, s, s ~Union~ {j}]]/j!], {j, 0, n/i}]]];
    a[n_] := b[n, n, {}];
    Table[a[n], {n, 0, 45}] (* Jean-François Alcover, May 17 2018, translated from Maple *)
  • PARI
    a(n)={((r,k,b,w)->if(!k||!r, if(r,0,w!), sum(m=0, r\k, if(!m || !bittest(b,m), self()(r-k*m, k-1, bitor(b,1<Andrew Howroyd, Aug 31 2019

A242887 Number T(n,k) of compositions of n into parts with distinct multiplicities and with exactly k parts; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 3, 1, 0, 1, 0, 6, 4, 1, 0, 1, 1, 4, 4, 5, 1, 0, 1, 0, 9, 8, 15, 6, 1, 0, 1, 1, 9, 5, 15, 21, 7, 1, 0, 1, 0, 10, 8, 20, 6, 28, 8, 1, 0, 1, 1, 12, 12, 6, 96, 42, 36, 9, 1, 0, 1, 0, 15, 12, 30, 192, 168, 64, 45, 10, 1, 0, 1, 1, 13, 9, 20, 142, 238, 204, 93, 55, 11, 1
Offset: 0

Views

Author

Alois P. Heinz, May 25 2014

Keywords

Examples

			T(5,1) = 1: [5].
T(5,3) = 6: [1,2,2], [2,1,2], [2,2,1], [1,1,3], [1,3,1], [3,1,1].
T(5,4) = 4: [1,1,1,2], [1,1,2,1], [1,2,1,1], [2,1,1,1].
T(5,5) = 1: [1,1,1,1,1].
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 0,  1;
  0, 1, 1,  3,  1;
  0, 1, 0,  6,  4,  1;
  0, 1, 1,  4,  4,  5,  1;
  0, 1, 0,  9,  8, 15,  6,  1;
  0, 1, 1,  9,  5, 15, 21,  7,  1;
  0, 1, 0, 10,  8, 20,  6, 28,  8, 1;
  0, 1, 1, 12, 12,  6, 96, 42, 36, 9, 1;
		

Crossrefs

Columns k=0-10 give: A000007, A057427, A059841 (for n>1), A321773, A321774, A321775, A321776, A321777, A321778, A321779, A321780.
Row sums give A242882.
T(2n,n) gives A321772.
Cf. A242896.

Programs

  • Maple
    b:= proc(n, i, s) option remember; `if`(n=0, add(j, j=s)!,
          `if`(i<1, 0, expand(add(`if`(j>0 and j in s, 0, x^j*
           b(n-i*j, i-1,`if`(j=0, s, s union {j}))/j!), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p,x,i), i=0..degree(p)))(b(n$2, {})):
    seq(T(n), n=0..16);
  • Mathematica
    b[n_, i_, s_] := b[n, i, s] = If[n==0, Total[s]!, If[i<1, 0, Expand[Sum[ If[j>0 && MemberQ[s, j], 0, x^j*b[n-i*j, i-1, If[j==0, s, s ~Union~ {j}] ]/j!], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, {}]]; Table[T[n], {n, 0, 16}] // Flatten (* Jean-François Alcover, Feb 08 2017, translated from Maple *)
  • PARI
    T(n)={Vecrev(((r,k,b,w)->if(!k||!r, if(r,0,w!*x^w), sum(m=0, r\k, if(!m || !bittest(b,m), self()(r-k*m, k-1, bitor(b,1<Andrew Howroyd, Aug 31 2019

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 *)

A242900 Number of compositions of n into exactly two different parts with distinct multiplicities.

Original entry on oeis.org

3, 10, 12, 38, 56, 79, 152, 251, 284, 594, 920, 1108, 2136, 3402, 4407, 8350, 12863, 17328, 33218, 52527, 70074, 133247, 214551, 294299, 547360, 883572, 1234509, 2284840, 3667144, 5219161, 9551081, 15386201, 22079741, 40061664, 64666975, 93985744, 168363731
Offset: 4

Views

Author

Alois P. Heinz, May 25 2014

Keywords

Examples

			a(4) = 3: [2,1,1], [1,2,1], [1,1,2].
a(5) = 10: [2,1,1,1], [1,2,1,1], [1,1,2,1], [1,1,1,2], [2,2,1], [2,1,2], [1,2,2], [3,1,1], [1,3,1], [1,1,3].
		

Crossrefs

Column k=2 of A242896.
Cf. A182473 (the same for partitions), A131661 (multiplicities may be equal).

Programs

  • Maple
    with(numtheory):
    a:= n-> add(add(add(`if`(d

    m, binomial((n-p*m) /d+m, m), 0), d=divisors(n-p*m)), m=1..n/p), p=2..n-1): seq(a(n), n=4..60);

  • Mathematica
    div[0] = {}; div[n_] := Divisors[n]; a[n_] := Sum[Sum[Sum[If[d

Formula

a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n+1). - Vaclav Kotesovec, Aug 21 2014

A246230 Number of compositions of n into exactly three different parts with distinct multiplicities.

Original entry on oeis.org

60, 285, 498, 1438, 2816, 5208, 11195, 24094, 38523, 85182, 148051, 255922, 512428, 991423, 1573152, 3318750, 5820718, 9712145, 19523028, 36637218, 58805129, 121712569, 216006156, 360123456, 720094287, 1340734558, 2184432420, 4453145090, 7987036106, 13417450294
Offset: 10

Views

Author

Alois P. Heinz, Aug 19 2014

Keywords

Crossrefs

Column k=3 of A242896.

Programs

  • Mathematica
    b[n_, i_, s_List] := b[n, i, s] = If[n == 0, Total[s]!, If[i<1, 0, Expand[ Sum[ If[j>0 && MemberQ[s, j], 0, If[j == 0, 1, x]*b[n-i*j, i-1, If[j == 0, s, s ~Union~{j}]]/j!], {j, 0, n/i}]]]]; a[n_] := Coefficient[b[n, n, {}], x, 3]; Table[a[n], {n, 10, 40}] (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

A246231 Number of compositions of n into exactly four different parts with distinct multiplicities.

Original entry on oeis.org

12600, 78120, 189000, 549000, 1389960, 2858640, 6471699, 15289662, 29639082, 64025820, 134997382, 267550925, 545274648, 1161661901, 2223888268, 4552401195, 9185643748, 17829746962, 35102264675, 71613947350, 135793314152, 270167493481, 534784841445
Offset: 20

Views

Author

Alois P. Heinz, Aug 19 2014

Keywords

Crossrefs

Column k=4 of A242896.

Programs

  • Mathematica
    b[n_, i_, s_List] := b[n, i, s] = If[n == 0, Total[s]!, If[i<1, 0, Expand[ Sum[ If[j>0 && MemberQ[s, j], 0, If[j == 0, 1, x]*b[n-i*j, i-1, If[j == 0, s, s ~Union~ {j}]]/j!], {j, 0, n/i}]]]]; a[n_] := Coefficient[b[n, n, {}], x, 4]; Table[a[n], {n, 20, 50}] (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

A246232 Number of compositions of n into exactly five different parts with distinct multiplicities.

Original entry on oeis.org

37837800, 290089800, 913512600, 2870988120, 8647198560, 20798177400, 52611741000, 134182896120, 299814913440, 688027838400, 1598171790600, 3415039782840, 7488313184520, 16753428299160, 34973088459120, 74787505653264, 162128661286152, 333915200009352
Offset: 35

Views

Author

Alois P. Heinz, Aug 19 2014

Keywords

Crossrefs

Column k=5 of A242896.

Programs

  • Mathematica
    b[n_, i_, s_List] := b[n, i, s] = If[n == 0, Total[s]!, If[i<1, 0, Expand[ Sum[ If[j>0 && MemberQ[s, j], 0, If[j == 0, 1, x]*b[n-i*j, i-1, If[j == 0, s, s ~Union~ {j}]]/j!], {j, 0, n/i}]]]]; a[n_] := Coefficient[b[n, n, {}], x, 5]; Table[a[n], {n, 35, 60}] (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

A246233 Number of compositions of n into exactly six different parts with distinct multiplicities.

Original entry on oeis.org

2053230379200, 18772392038400, 73402986056400, 257607082933200, 886531102657200, 2509031227903200, 7078865111398080, 19909183290796800, 51039390957675120, 128693357256063600, 326570236365292920, 777083694958410840, 1847217791018559960, 4410908197048833480
Offset: 56

Views

Author

Alois P. Heinz, Aug 19 2014

Keywords

Crossrefs

Column k=6 of A242896.

Programs

  • Mathematica
    $RecursionLimit = 1000; b[n_, i_, s_List] := b[n, i, s] = If[n == 0, Total[s]!, If[i < 1, 0, Expand[ Sum[ If[j > 0 && MemberQ[s, j], 0, If[j == 0, 1, x]*b[n - i*j, i - 1, If[j == 0, s, s~Union~{j}]]/j!], {j, 0, n/i}]]]]; a[n_] := Coefficient[b[n, n, {}], x, 6]; Table[a[n], {n, 56, 80}] (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

A246234 Number of compositions of n into exactly seven different parts with distinct multiplicities.

Original entry on oeis.org

2431106898187968000, 25830510793247160000, 121150160426367072000, 478913588068635720000, 1848522650426852400000, 6067325851827648408000, 19158973516499432616000, 59882095876893754464000, 173801554657753702680000, 487295849448575903736000
Offset: 84

Views

Author

Alois P. Heinz, Aug 19 2014

Keywords

Crossrefs

Column k=7 of A242896.

Programs

  • Mathematica
    $RecursionLimit = 1000; b[n_, i_, s_List] := b[n, i, s] = If[n == 0, Total[s]!, If[i < 1, 0, Expand[ Sum[ If[j > 0 && MemberQ[s, j], 0, If[j == 0, 1, x]*b[n - i*j, i - 1, If[j == 0, s, s ~Union~ {j}]]/j!], {j, 0, n/i}]]]]; a[n_] := Coefficient[b[n, n, {}], x, 7]; Table[a[n], {n, 84, 100}] (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)
Showing 1-9 of 9 results.