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.

A238342 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with exactly k occurrences of the smallest part, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 3, 4, 0, 1, 0, 8, 3, 4, 0, 1, 0, 11, 10, 5, 5, 0, 1, 0, 20, 18, 14, 5, 6, 0, 1, 0, 34, 35, 24, 21, 6, 7, 0, 1, 0, 59, 60, 59, 35, 27, 7, 8, 0, 1, 0, 96, 121, 108, 85, 49, 35, 8, 9, 0, 1, 0, 167, 217, 213, 175, 125, 63, 44, 9, 10, 0, 1, 0, 282, 391, 419, 366, 258, 176, 80, 54, 10, 11, 0, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Conjecture: Generally, for k > 0 is a(n) ~ n^k * ((1+sqrt(5))/2)^(n-2*k-1) / (5^((k+1)/2) * k!). Holds for all k<=10. - Vaclav Kotesovec, May 02 2014
G.f.: 1 + Sum_{i>0} (-y*(x^i)*(x - 1)^2)/( (x^(i+1) + x - 1)*((x^i)*(x*(y - 1) - y) - x + 1) ). - John Tyler Rascoe, Oct 15 2024
Sum_{k=0..n} k * T(n,k) = A097941(n). - Alois P. Heinz, Oct 15 2024

Examples

			Triangle starts:
00:  1;
01:  0,    1;
02:  0,    1,    1;
03:  0,    3,    0,    1;
04:  0,    3,    4,    0,    1;
05:  0,    8,    3,    4,    0,    1;
06:  0,   11,   10,    5,    5,    0,    1;
07:  0,   20,   18,   14,    5,    6,    0,    1;
08:  0,   34,   35,   24,   21,    6,    7,    0,   1;
09:  0,   59,   60,   59,   35,   27,    7,    8,   0,   1;
10:  0,   96,  121,  108,   85,   49,   35,    8,   9,   0,   1;
11:  0,  167,  217,  213,  175,  125,   63,   44,   9,  10,   0,  1;
12:  0,  282,  391,  419,  366,  258,  176,   80,  54,  10,  11,  0,  1;
13:  0,  475,  709,  808,  730,  579,  371,  236,  99,  65,  11, 12,  0,  1;
14:  0,  800, 1281, 1522, 1481, 1202,  861,  513, 309, 120,  77, 12, 13,  0, 1;
15:  0, 1352, 2283, 2872, 2925, 2512, 1862, 1238, 684, 395, 143, 90, 13, 14, 0, 1;
...
		

Crossrefs

Cf. A238341 (the same for largest part).
Row sums are A011782.
T(2*n,n) gives A232665(n).
Cf. A097941.

Programs

  • Maple
    b:= proc(n, s) option remember;`if`(n=0, 1,
          `if`(n`if`(k=0, `if`(n=0, 1, 0), add((p->add(coeff(p, x, i)*
         binomial(i+k, k), i=0..degree(p)))(b(n-j*k, j+1)), j=1..n/k)):
    seq(seq(T(n, k), k=0..n), n=0..15);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Nov 07 2014, translated from Maple *)
  • PARI
    T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h=1+sum(i=1,N,(-y*(x^i)*(x-1)^2)/((x^(i+1)+x-1)*((x^i)*(x*(y-1)-y)-x+1)))); for(i=0,N-1, print(Vecrev(polcoef(h,i))))}
    T_xy(15) \\ John Tyler Rascoe, Oct 15 2024

A079501 Number of compositions of the integer n with strictly smallest part in the first position.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 8, 12, 19, 28, 45, 70, 110, 173, 275, 436, 695, 1107, 1769, 2831, 4537, 7276, 11683, 18774, 30194, 48592, 78247, 126062, 203192, 327645, 528518, 852815, 1376491, 2222294, 3588628, 5796196, 9363458, 15128631, 24447014, 39510108
Offset: 1

Views

Author

Arnold Knopfmacher, Jan 21 2003

Keywords

Comments

Also number of compositions of n such that the first part is divisible by the number of parts . [Vladeta Jovovic, Dec 02 2009]

Examples

			The a(9)=19 such compositions of 9 are
[ 1]  [ 1 2 2 2 2 ]
[ 2]  [ 1 2 2 4 ]
[ 3]  [ 1 2 3 3 ]
[ 4]  [ 1 2 4 2 ]
[ 5]  [ 1 2 6 ]
[ 6]  [ 1 3 2 3 ]
[ 7]  [ 1 3 3 2 ]
[ 8]  [ 1 3 5 ]
[ 9]  [ 1 4 2 2 ]
[10]  [ 1 4 4 ]
[11]  [ 1 5 3 ]
[12]  [ 1 6 2 ]
[13]  [ 1 8 ]
[14]  [ 2 3 4 ]
[15]  [ 2 4 3 ]
[16]  [ 2 7 ]
[17]  [ 3 6 ]
[18]  [ 4 5 ]
[19]  [ 9 ]
- _Joerg Arndt_, Jan 01 2013
		

References

  • Arnold Knopfmacher and Neville Robbins, Compositions with parts constrained by the leading summand, Ars Combin. 76 (2005), 287-295.

Crossrefs

Cf. A168655, A168656, A168657. [From Vladeta Jovovic, Dec 02 2009]

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1, add(
          `if`(n-j>0 and n-j<=s, 0, b(n-j, s)), j=s+1..n))
        end:
    a:= n-> 1 +add(b(n-j, j), j=1..n/2):
    seq(a(n), n=1..60);  # Alois P. Heinz, Apr 29 2014
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, Sum[ If[n - j > 0 && n - j <= s, 0, b[n - j, s]], {j, s + 1, n}]]; a[n_] := 1 + Sum[b[n - j, j], {j, 1, n/2}]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jan 16 2015, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>=1} (1-z)*z^k/(1-z-z^(k+1)).
G.f.: Sum_{k>=1} z^(2*k-1)/((1-z^k)*(1-z)^(k-1)), cf. A105039. - Vladeta Jovovic, Apr 05 2005
a(n) ~ 1/sqrt(5) * ((1+sqrt(5))/2)^(n-2). - Vaclav Kotesovec, May 01 2014
G.f.: Sum_{n>=1} q^n/(1-Sum_{k>=n+1} q^k). - Joerg Arndt, Jan 03 2024

Extensions

More terms from Benoit Cloitre, Jan 21 2003

A363224 Number of integer compositions of n in which the least part appears more than once.

Original entry on oeis.org

0, 1, 1, 5, 8, 21, 44, 94, 197, 416, 857, 1766, 3621, 7392, 15032, 30493, 61708, 124646, 251359, 506203, 1018279, 2046454, 4109534, 8246985, 16540791, 33160051, 66451484, 133122753, 266612828, 533839069, 1068701695, 2139110054, 4281063708, 8566862025
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2023

Keywords

Comments

Also the number of multisets of length n covering an initial interval of positive integers with more than one co-mode.

Examples

			The a(1) = 0 through a(6) = 21 compositions:
  .  (11)  (111)  (22)    (113)    (33)
                  (112)   (131)    (114)
                  (121)   (311)    (141)
                  (211)   (1112)   (222)
                  (1111)  (1121)   (411)
                          (1211)   (1113)
                          (2111)   (1122)
                          (11111)  (1131)
                                   (1212)
                                   (1221)
                                   (1311)
                                   (2112)
                                   (2121)
                                   (2211)
                                   (3111)
                                   (11112)
                                   (11121)
                                   (11211)
                                   (12111)
                                   (21111)
                                   (111111)
		

Crossrefs

The complement is counted by A105039.
For partitions instead of compositions we have A117989.
Row sums of columns k > 1 of A238342.
If all parts appear more than once we have A240085, for partitions A007690.
If the least part appears exactly twice we have A241862.
For greatest instead of least we have A363262, see triangle A238341.
A000041 counts integer partitions, strict A000009.
A032020 counts strict compositions.
A067029 gives last exponent in prime factorization, first A071178.
A261982 counts compositions with some part appearing more than once.
A362607 counts partitions with multiple modes, co-modes A362609.
A362608 counts partitions with a unique mode, co-mode A362610.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Count[#,Min@@#]>1&]],{n,15}]
  • PARI
    C_x(N)={my(x='x+O('x^N), h=sum(i=1,N,(x^(2*i)*(x-1)^3)/((x^i+x-1)*(x^(i+1)+x-1)^2))); concat([0],Vec(h))}
    C_x(35) \\ John Tyler Rascoe, Jul 06 2024

Formula

G.f.: Sum_{i>0} (x^(2*i) * (x-1)^3)/((x^i + x - 1)*(x^(i+1) + x - 1)^2). - John Tyler Rascoe, Jul 06 2024

A363262 Number of integer compositions of n in which the greatest part appears more than once.

Original entry on oeis.org

0, 1, 1, 2, 4, 9, 18, 37, 73, 145, 287, 570, 1134, 2264, 4526, 9061, 18152, 36374, 72884, 146011, 292416, 585422, 1171632, 2344136, 4688821, 9376832, 18749169, 37485358, 74939850, 149813328, 299492966, 598729533, 1196987066, 2393137399, 4784846896, 9567357951
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2023

Keywords

Comments

Also the number of multisets of length n covering an initial interval of positive integers with more than one mode.

Examples

			The a(2) = 1 through a(6) = 9 compositions:
  (11)  (111)  (22)    (122)    (33)
               (1111)  (212)    (222)
                       (221)    (1122)
                       (11111)  (1212)
                                (1221)
                                (2112)
                                (2121)
                                (2211)
                                (111111)
		

Crossrefs

For partitions instead of compositions we have A002865.
The complement is counted by A097979 shifted left.
Row sums of columns k > 1 of A238341.
If all parts appear more than once we have A240085, for partitions A007690.
If the greatest part appears exactly twice we have A243737.
For least instead of greatest we have A363224, see triangle A238342.
A000041 counts integer partitions, strict A000009.
A032020 counts strict compositions.
A067029 gives last exponent in prime factorization, first A071178.
A261982 counts compositions with some part appearing more than once.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Count[#,Max@@#]>1&]],{n,15}]

A363263 Number of integer partitions of n covering an initial interval of positive integers with a unique co-mode.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 2, 4, 4, 5, 7, 10, 8, 13, 13, 15, 19, 25, 24, 35, 35, 43, 50, 61, 59, 79, 83, 98, 111, 137, 137, 176, 187, 219, 240, 284, 298, 360, 385, 444, 485, 568, 600, 706, 763, 867, 951, 1088, 1168, 1345, 1453, 1641, 1792, 2023, 2179, 2467, 2673, 2988
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2023

Keywords

Comments

We define a co-mode in a multiset to be an element that appears at most as many times as each of the others. For example, the co-modes of {a,a,b,b,b,c,c} are {a,c}.

Examples

			The a(1) = 1 through a(10) = 7 partitions:
  1  11  111  211   221    21111   2221     22211     22221      33211
              1111  2111   111111  22111    221111    32211      222211
                    11111          211111   2111111   2211111    322111
                                   1111111  11111111  21111111   2221111
                                                      111111111  22111111
                                                                 211111111
                                                                 1111111111
The a(9) = 5 through a(12) = 8 partitions:
  (22221)      (33211)       (33221)        (2222211)
  (32211)      (222211)      (222221)       (3222111)
  (2211111)    (322111)      (322211)       (3321111)
  (21111111)   (2221111)     (332111)       (32211111)
  (111111111)  (22111111)    (2222111)      (222111111)
               (211111111)   (3221111)      (2211111111)
               (1111111111)  (22211111)     (21111111111)
                             (221111111)    (111111111111)
                             (2111111111)
                             (11111111111)
		

Crossrefs

For parts instead of multiplicities we have A087897, complement A000009.
For multisets instead of partitions we have A105039, complement A363224.
The complement is counted by A363264.
For mode we have A363484, complement A363485.
A000041 counts integer partitions, A000009 covering an initial interval.
A097979 counts normal multisets with a unique mode, complement A363262.
A362607 counts partitions with multiple modes, co-modes A362609.
A362608 counts partitions with a unique mode, co-mode A362610.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    comsi[ms_]:=Select[Union[ms],Count[ms,#]<=Min@@Length/@Split[ms]&];
    Table[If[n==0,0,Length[Select[IntegerPartitions[n],Union[#]==Range[Max@@#]&&Length[comsi[#]]==1&]]],{n,0,30}]

A363264 Number of integer partitions of n covering an initial interval of positive integers with a more than one co-mode.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 1, 2, 3, 3, 2, 7, 5, 9, 12, 13, 13, 22, 19, 29, 33, 39, 43, 63, 63, 82, 94, 111, 119, 159, 164, 203, 229, 272, 301, 370, 400, 479, 538, 628, 692, 826, 904, 1053, 1181, 1353, 1502, 1742, 1919, 2205, 2456, 2790, 3097, 3539, 3911, 4435, 4929
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2023

Keywords

Comments

We define a co-mode in a multiset to be an element that appears at most as many times as each of the others. For example, the co-modes of {a,a,b,b,b,c,c} are {a,c}.

Crossrefs

For parts instead of multiplicities we have A000009, complement A087897.
For multisets instead of partitions we have A363224, complement A105039.
The complement is counted by A363263.
For mode we have A363485, complement A363484.
A000041 counts integer partitions, A000009 covering an initial interval.
A067029 counts minima in prime factorization, co-modes A362613.
A071178 counts maxima in prime factorization, modes A362611.
A097979 counts normal multisets with a unique mode, complement A363262.
A362607 counts partitions with multiple modes, co-modes A362609.
A362608 counts partitions with a unique mode, co-mode A362610.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    comsi[ms_]:=Select[Union[ms],Count[ms,#]<=Min@@Length/@Split[ms]&];
    Table[If[n==0,0,Length[Select[IntegerPartitions[n],Union[#]==Range[Max@@#]&&Length[comsi[#]]>1&]]],{n,0,30}]

A363484 Number of integer partitions of n covering an initial interval of positive integers with a unique mode.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 2, 5, 6, 6, 8, 11, 12, 17, 20, 21, 27, 35, 38, 50, 56, 65, 76, 95, 105, 125, 146, 167, 198, 233, 252, 305, 351, 394, 457, 522, 585, 681, 778, 878, 994, 1135, 1269, 1446, 1638, 1828, 2067, 2339, 2613, 2940, 3301, 3684, 4143, 4634, 5156, 5771
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The a(1) = 1 through a(8) = 6 partitions:
  (1)  (11)  (111)  (211)   (221)    (21111)   (2221)     (3221)
                    (1111)  (2111)   (111111)  (3211)     (22211)
                            (11111)            (22111)    (32111)
                                               (211111)   (221111)
                                               (1111111)  (2111111)
                                                          (11111111)
		

Crossrefs

For parts instead of multiplicities we have A096765, complement A025147.
For multisets instead of partitions we have A097979, complement A363262.
For co-mode we have A363263, complement A363264.
The complement is counted by A363485.
A000041 counts integer partitions, A000009 covering an initial interval.
A362607 counts partitions with multiple modes, co-modes A362609.
A362608 counts partitions with a unique mode, co-mode A362610.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    Table[If[n==0,0,Length[Select[IntegerPartitions[n], Union[#]==Range[Max@@#]&&Length[Commonest[#]]==1&]]],{n,0,30}]

A363485 Number of integer partitions of n covering an initial interval of positive integers with more than one mode.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 2, 1, 3, 1, 2, 6, 5, 3, 8, 4, 8, 11, 13, 9, 17, 17, 19, 25, 24, 23, 44, 35, 39, 54, 55, 63, 83, 79, 86, 104, 119, 125, 157, 164, 178, 220, 237, 251, 297, 324, 357, 413, 439, 486, 562, 607, 673, 765, 828, 901, 1040, 1117, 1220
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes of {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The a(n) partitions for n = {3, 6, 12, 15, 16, 18}:
  (21)  (321)   (332211)    (54321)       (443221)    (4433211)
        (2211)  (3222111)   (433221)      (3332221)   (5432211)
                (22221111)  (443211)      (4332211)   (43332111)
                            (33222111)    (33322111)  (333222111)
                            (322221111)   (43222111)  (333321111)
                            (2222211111)              (3322221111)
                                                      (32222211111)
                                                      (222222111111)
		

Crossrefs

For parts instead of multiplicities we have A025147, complement A096765.
For co-mode we have A363264, complement A363263.
The complement is counted by A363484.
A000041 counts integer partitions, A000009 covering an initial interval.
A071178 counts maxima in prime factorization, modes A362611.
A362607 counts partitions with multiple modes, co-modes A362609.
A362608 counts partitions with a unique mode, co-mode A362610.
A362614 counts partitions by number of modes, co-modes A362615.

Programs

  • Mathematica
    Table[If[n==0,0,Length[Select[IntegerPartitions[n], Union[#]==Range[Max@@#]&&Length[Commonest[#]]>1&]]],{n,0,30}]

A383870 Number of compositions of n such that none of the smallest parts are adjacent.

Original entry on oeis.org

1, 1, 1, 3, 4, 9, 15, 29, 53, 98, 180, 336, 618, 1142, 2110, 3899, 7197, 13283, 24509, 45218, 83396, 153769, 283463, 522449, 962732, 1773742, 3267417, 6018030, 11082693, 20407174, 37572633, 69169726, 127326924, 234362474, 431343281, 793831500, 1460854117
Offset: 0

Views

Author

John Tyler Rascoe, May 13 2025

Keywords

Examples

			a(5) = 9 counts: (1,2,2), (1,3,1), (1,4), (2,1,2), (2,2,1), (2,3), (3,2), (4,1), (5).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(i<1, 0,
         `if`(irem(n, i, 'r')=0, p!*binomial(p+1, r), 0)+
          add(b(n-i*j, min(n-i*j, i-1), p+j)/j!, j=0..n/i))
        end:
    a:= n-> `if`(n=0, 1, b(n$2, 0)):
    seq(a(n), n=0..36);  # Alois P. Heinz, May 13 2025
  • PARI
    A_x(N) ={Vec(1+sum(j=0,N, sum(i=j+1,N-j, (binomial(i,i-j-1) * x^(j+1) * (x^2/(1-x))^(i-1) )/(1-x^(i+j))))+O('x^N))}
    A_x(50)

Formula

G.f.: 1 + Sum_{j>=0} Sum_{i>j} (binomial(i,i-j-1) * x^(j+1) * (x^2/(1 - x))^(i-1))/(1 - x^(i+j)).
Showing 1-9 of 9 results.