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-10 of 12 results. Next

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

A242896 Number T(n,k) of compositions of n into k parts with distinct multiplicities, where parts are counted without 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, 3, 0, 2, 10, 0, 4, 12, 0, 2, 38, 0, 4, 56, 0, 3, 79, 0, 4, 152, 60, 0, 2, 251, 285, 0, 6, 284, 498, 0, 2, 594, 1438, 0, 4, 920, 2816, 0, 4, 1108, 5208, 0, 5, 2136, 11195, 0, 2, 3402, 24094, 0, 6, 4407, 38523, 0, 2, 8350, 85182
Offset: 0

Views

Author

Alois P. Heinz, May 25 2014

Keywords

Examples

			T(5,1) = 2: [1,1,1,1,1], [5].
T(5,2) = 10: [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].
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 2;
  0, 2;
  0, 3,   3;
  0, 2,  10;
  0, 4,  12;
  0, 2,  38;
  0, 4,  56;
  0, 3,  79;
  0, 4, 152, 60;
		

Crossrefs

Row sums give A242882.
Cf. A182485 (the same for partitions), A242887.

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, `if`(j=0, 1, x)*
           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_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}]]]]; 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 11 2015, after Alois P. Heinz *)

A321773 Number of compositions of n into parts with distinct multiplicities and with exactly three parts.

Original entry on oeis.org

1, 3, 6, 4, 9, 9, 10, 12, 15, 13, 18, 18, 19, 21, 24, 22, 27, 27, 28, 30, 33, 31, 36, 36, 37, 39, 42, 40, 45, 45, 46, 48, 51, 49, 54, 54, 55, 57, 60, 58, 63, 63, 64, 66, 69, 67, 72, 72, 73, 75, 78, 76, 81, 81, 82, 84, 87, 85, 90, 90, 91, 93, 96, 94, 99, 99
Offset: 3

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Examples

			From _Gus Wiseman_, Nov 11 2020: (Start)
Also the number of 3-part non-strict compositions of n. For example, the a(3) = 1 through a(11) = 15 triples are:
  111   112   113   114   115   116   117   118   119
        121   122   141   133   161   144   181   155
        211   131   222   151   224   171   226   191
              212   411   223   233   225   244   227
              221         232   242   252   262   272
              311         313   323   333   334   335
                          322   332   414   343   344
                          331   422   441   424   353
                          511   611   522   433   434
                                      711   442   443
                                            622   515
                                            811   533
                                                  551
                                                  722
                                                  911
(End)
		

Crossrefs

Column k=3 of A242887.
A235451 counts 3-part compositions with distinct run-lengths
A001399(n-6) counts 3-part compositions in the complement.
A014311 intersected with A335488 ranks these compositions.
A140106 is the unordered case, with Heinz numbers A285508.
A261982 counts non-strict compositions of any length.
A001523 counts unimodal compositions, with complement A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions.
A047967 counts non-strict partitions, with Heinz numbers A013929.
A242771 counts triples that are not strictly increasing.

Programs

  • Mathematica
    Table[Length[Join@@Permutations/@Select[IntegerPartitions[n,{3}],!UnsameQ@@#&]],{n,0,100}] (* Gus Wiseman, Nov 11 2020 *)

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^3*(1 + 3*x + 5*x^2) / ((1 - x)^2*(1 + x)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) - a(n-5) for n>7. (End)
Conjecture: a(n) = (3*n-k)/2 where k value has a cycle of 6 starting from n=3 of (7,6,3,10,3,6). - Bill McEachen, Aug 12 2025

A321772 Number of compositions of 2n into parts with distinct multiplicities and with exactly n parts.

Original entry on oeis.org

1, 1, 1, 4, 5, 6, 142, 428, 1269, 3874, 20336, 114522, 429002, 1743184, 6456192, 23749014, 93997909, 368890906, 1122546076, 4496925530, 17437145160, 76147395524, 310155556998, 1417665712388, 5528899930962, 21923449788406, 82833896451112, 347234278501138
Offset: 0

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Examples

			a(0) = 1: the empty composition.
a(1) = 1: 2.
a(2) = 1: 22.
a(3) = 4: 222, 114, 141, 411.
		

Crossrefs

Cf. A242887.

Formula

a(n) = A242887(2n,n).

A321774 Number of compositions of n into parts with distinct multiplicities and with exactly four parts.

Original entry on oeis.org

1, 4, 4, 8, 5, 8, 12, 12, 9, 16, 16, 16, 17, 20, 20, 24, 21, 24, 28, 28, 25, 32, 32, 32, 33, 36, 36, 40, 37, 40, 44, 44, 41, 48, 48, 48, 49, 52, 52, 56, 53, 56, 60, 60, 57, 64, 64, 64, 65, 68, 68, 72, 69, 72, 76, 76, 73, 80, 80, 80, 81, 84, 84, 88, 85, 88, 92
Offset: 4

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Crossrefs

Column k=4 of A242887.

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^4*(1 + 4*x + 4*x^2 + 7*x^3) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-3) + a(n-4) - a(n-7) for n>10.
(End)

A321775 Number of compositions of n into parts with distinct multiplicities and with exactly five parts.

Original entry on oeis.org

1, 5, 15, 15, 20, 6, 30, 20, 35, 35, 21, 35, 50, 40, 50, 36, 55, 55, 65, 55, 56, 70, 70, 70, 85, 61, 85, 85, 90, 90, 86, 90, 105, 105, 105, 91, 120, 110, 120, 120, 111, 125, 135, 125, 140, 126, 140, 140, 155, 145, 141, 155, 160, 160, 170, 146, 175, 175, 175
Offset: 5

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Crossrefs

Column k=5 of A242887.

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^5*(1 + 6*x + 21*x^2 + 35*x^3 + 49*x^4 + 34*x^5 + 29*x^6) / ((1 - x)^2*(1 + x)*(1 + x^2)*(1 + x + x^2)*(1 + x + x^2 + x^3 + x^4)).
a(n) = -a(n-1) - a(n-2) + a(n-4) + 2*a(n-5) + 2*a(n-6) + a(n-7) - a(n-9) - a(n-10) - a(n-11) for n>15.
(End)

A321776 Number of compositions of n into parts with distinct multiplicities and with exactly six parts.

Original entry on oeis.org

1, 6, 21, 6, 96, 192, 142, 372, 357, 372, 543, 798, 598, 1098, 1098, 1044, 1359, 1764, 1459, 2184, 2100, 2130, 2580, 3090, 2635, 3576, 3561, 3576, 4116, 4776, 4162, 5382, 5337, 5382, 6057, 6768, 6058, 7548, 7518, 7548, 8259, 9174, 8359, 10074, 10014, 10020
Offset: 6

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Crossrefs

Column k=6 of A242887.

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^6*(1 + 7*x + 28*x^2 + 33*x^3 + 122*x^4 + 286*x^5 + 394*x^6 + 638*x^7 + 687*x^8 + 652*x^9 + 433*x^10 + 319*x^11) / ((1 - x)^3*(1 + x)^2*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)^2*(1 + x + x^2 + x^3 + x^4)).
a(n) = -a(n-1) - a(n-2) + a(n-4) + 2*a(n-5) + 3*a(n-6) + 2*a(n-7) + a(n-8) - a(n-9) - 2*a(n-10) - 3*a(n-11) - 2*a(n-12) - a(n-13) + a(n-15) + a(n-16) + a(n-17).
(End)

A321777 Number of compositions of n into parts with distinct multiplicities and with exactly seven parts.

Original entry on oeis.org

1, 7, 28, 42, 168, 238, 280, 428, 595, 595, 826, 910, 1078, 1232, 1716, 1498, 2023, 2093, 2450, 2450, 2996, 3228, 3626, 3710, 4193, 4263, 4998, 4928, 5916, 5838, 6426, 6510, 7371, 7455, 8316, 8464, 9198, 9268, 10318, 10248, 11319, 11473, 12524, 12460, 13636
Offset: 7

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Crossrefs

Column k=7 of A242887.

Formula

Conjectures from Colin Barker, Dec 11 2018: (Start)
G.f.: x^7*(1 + 8*x + 36*x^2 + 78*x^3 + 245*x^4 + 475*x^5 + 719*x^6 + 1069*x^7 + 1419*x^8 + 1539*x^9 + 1645*x^10 + 1478*x^11 + 1100*x^12 + 708*x^13 + 505*x^14) / ((1 - x)^3*(1 + x)^2*(1 - x + x^2)*(1 + x^2)*(1 + x + x^2)*(1 + x + x^2 + x^3 + x^4)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)).
a(n) = -a(n-1) - a(n-2) - a(n-3) + a(n-5) + 2*a(n-6) + 3*a(n-7) + 3*a(n-8) + 2*a(n-9) + a(n-10) - a(n-11) - 2*a(n-12) - 3*a(n-13) - 3*a(n-14) - 2*a(n-15) - a(n-16) + a(n-18) + a(n-19) + a(n-20) + a(n-21) for n>27.
(End)

A321778 Number of compositions of n into parts with distinct multiplicities and with exactly eight parts.

Original entry on oeis.org

1, 8, 36, 64, 204, 680, 848, 1528, 1269, 2032, 2368, 3096, 2452, 4440, 4196, 5120, 5393, 7024, 6968, 8816, 7248, 9944, 10840, 11904, 11393, 14312, 14676, 16720, 14684, 18688, 18968, 21544, 20501, 24008, 25072, 26592, 24604, 30288, 30428, 33200, 31905, 36672
Offset: 8

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Crossrefs

Column k=8 of A242887.

A321779 Number of compositions of n into parts with distinct multiplicities and with exactly nine parts.

Original entry on oeis.org

1, 9, 45, 93, 423, 1143, 969, 3573, 4716, 3874, 7488, 8370, 5976, 9756, 13320, 8748, 17361, 16821, 18451, 21861, 25803, 18201, 32481, 30969, 27492, 34380, 44586, 37192, 48528, 47232, 44748, 56682, 62901, 50517, 70713, 68445, 70795, 76509, 88605, 72813, 96048
Offset: 9

Views

Author

Alois P. Heinz, Nov 18 2018

Keywords

Crossrefs

Column k=9 of A242887.
Showing 1-10 of 12 results. Next