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 18 results. Next

A362614 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with k modes.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 2, 1, 0, 4, 1, 0, 5, 2, 0, 7, 3, 1, 0, 11, 3, 1, 0, 16, 4, 2, 0, 21, 6, 3, 0, 29, 8, 4, 1, 0, 43, 7, 5, 1, 0, 54, 13, 8, 2, 0, 78, 12, 8, 3, 0, 102, 17, 11, 5, 0, 131, 26, 12, 6, 1, 0, 175, 29, 17, 9, 1, 0, 233, 33, 18, 11, 2, 0, 295, 47, 25
Offset: 0

Views

Author

Gus Wiseman, May 04 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

			Triangle begins:
   1
   0   1
   0   2
   0   2   1
   0   4   1
   0   5   2
   0   7   3   1
   0  11   3   1
   0  16   4   2
   0  21   6   3
   0  29   8   4   1
   0  43   7   5   1
   0  54  13   8   2
   0  78  12   8   3
   0 102  17  11   5
   0 131  26  12   6   1
   0 175  29  17   9   1
Row n = 8 counts the following partitions:
  (8)         (53)    (431)
  (44)        (62)    (521)
  (332)       (71)
  (422)       (3311)
  (611)
  (2222)
  (3221)
  (4211)
  (5111)
  (22211)
  (32111)
  (41111)
  (221111)
  (311111)
  (2111111)
  (11111111)
		

Crossrefs

Row sums are A000041.
Row lengths are A002024.
Removing columns 0 and 1 and taking sums gives A362607, ranks A362605.
Column k = 1 is A362608, ranks A356862.
This statistic (mode-count) is ranked by A362611.
For co-modes we have A362615, ranked by A362613.
A008284 counts partitions by length.
A096144 counts partitions by number of minima, A026794 by maxima.
A238342 counts compositions by number of minima, A238341 by maxima.
A275870 counts collapsible partitions.

Programs

  • Mathematica
    msi[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n],Length[msi[#]]==k&]],{n,0,15},{k,0,Floor[(Sqrt[1+8n]-1)/2]}]

Formula

Sum_{k=0..A003056(n)} k * T(n,k) = A372542. - Alois P. Heinz, May 05 2024

A362615 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with k co-modes.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 2, 1, 0, 4, 1, 0, 5, 2, 0, 7, 3, 1, 0, 10, 4, 1, 0, 13, 7, 2, 0, 16, 11, 3, 0, 23, 14, 4, 1, 0, 30, 19, 6, 1, 0, 35, 29, 11, 2, 0, 50, 34, 14, 3, 0, 61, 46, 23, 5, 0, 73, 69, 27, 6, 1, 0, 95, 81, 44, 10, 1, 0, 123, 105, 53, 14, 2
Offset: 0

Views

Author

Gus Wiseman, May 04 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

			Triangle begins:
   1
   0   1
   0   2
   0   2   1
   0   4   1
   0   5   2
   0   7   3   1
   0  10   4   1
   0  13   7   2
   0  16  11   3
   0  23  14   4   1
   0  30  19   6   1
   0  35  29  11   2
   0  50  34  14   3
   0  61  46  23   5
   0  73  69  27   6   1
   0  95  81  44  10   1
Row n = 8 counts the following partitions:
  (8)         (53)     (431)
  (44)        (62)     (521)
  (332)       (71)
  (422)       (3221)
  (611)       (3311)
  (2222)      (4211)
  (5111)      (32111)
  (22211)
  (41111)
  (221111)
  (311111)
  (2111111)
  (11111111)
		

Crossrefs

Row sums are A000041.
Row lengths are A002024.
Removing columns 0 and 1 and taking sums gives A362609, ranks A362606.
Column k = 1 is A362610, ranks A359178.
This statistic (co-mode count) is ranked by A362613.
For mode instead of co-mode we have A362614, ranked by A362611.
A008284 counts partitions by length.
A096144 counts partitions by number of minima, A026794 by maxima.
A238342 counts compositions by number of minima, A238341 by maxima.
A275870 counts collapsible partitions.

Programs

  • Mathematica
    comsi[ms_]:=Select[Union[ms],Count[ms,#]<=Min@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n],Length[comsi[#]]==k&]],{n,0,15},{k,0,Floor[(Sqrt[1+8n]-1)/2]}]

Formula

Sum_{k=0..A003056(n)} k * T(n,k) = A372632(n). - Alois P. Heinz, May 07 2024

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

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 0, 1, 0, 6, 1, 0, 1, 0, 12, 3, 0, 0, 1, 0, 23, 7, 1, 0, 0, 1, 0, 46, 13, 4, 0, 0, 0, 1, 0, 91, 25, 10, 1, 0, 0, 0, 1, 0, 183, 46, 21, 5, 0, 0, 0, 0, 1, 0, 367, 89, 39, 15, 1, 0, 0, 0, 0, 1, 0, 737, 175, 70, 35, 6, 0, 0, 0, 0, 0, 1, 0, 1478, 351, 125, 71, 21, 1, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Columns k=0-10 give: A000007, A097979(n-1) for n>0, A243737, A243738, A243739, A243740, A243741, A243742, A243743, A243744, A243745.
T(n^2,n) gives A243746(n).
Row sums are A011782.

Examples

			Triangle starts:
00:  1;
01:  0,     1;
02:  0,     1,    1;
03:  0,     3,    0,   1;
04:  0,     6,    1,   0,   1;
05:  0,    12,    3,   0,   0,   1;
06:  0,    23,    7,   1,   0,   0,  1;
07:  0,    46,   13,   4,   0,   0,  0, 1;
08:  0,    91,   25,  10,   1,   0,  0, 0, 1;
09:  0,   183,   46,  21,   5,   0,  0, 0, 0, 1;
10:  0,   367,   89,  39,  15,   1,  0, 0, 0, 0, 1;
11:  0,   737,  175,  70,  35,   6,  0, 0, 0, 0, 0, 1;
12:  0,  1478,  351, 125,  71,  21,  1, 0, 0, 0, 0, 0, 1;
13:  0,  2962,  710, 229, 131,  56,  7, 0, 0, 0, 0, 0, 0, 1;
14:  0,  5928, 1443, 435, 230, 126, 28, 1, 0, 0, 0, 0, 0, 0, 1,
15:  0, 11858, 2926, 859, 395, 253, 84, 8, 0, 0, 0, 0, 0, 0, 0, 1;
...
		

Crossrefs

Cf. A026794 (the same for partitions), A238342 (the same for smallest part).

Programs

A105039 Number of compositions of n with unique smallest part.

Original entry on oeis.org

1, 1, 3, 3, 8, 11, 20, 34, 59, 96, 167, 282, 475, 800, 1352, 2275, 3828, 6426, 10785, 18085, 30297, 50698, 84770, 141623, 236425, 394381, 657380, 1094975, 1822628, 3031843, 5040129, 8373594, 13903588, 23072567, 38267330, 63435438, 105103059, 174054820, 288105394
Offset: 1

Views

Author

Vladeta Jovovic, Apr 03 2005

Keywords

Examples

			a(5) = 8 because we have 5, 14, 41, 23, 32, 122, 212 and 221.
		

Crossrefs

Column k=1 of A238342.

Programs

  • Maple
    G:= sum(k*x^(2*k-1)/((1-x^k)*(1-x)^(k-1)), k=1..70): Gser:=series(G,x=0,44): seq(coeff(Gser,x^n),n=1..41); # Emeric Deutsch, Apr 13 2005
  • Mathematica
    nn=37;Drop[CoefficientList[Series[Sum[x^j/(1-x^(j+1)/(1-x))^2,{j,1,nn}],{x,0,nn}],x],1] (* Geoffrey Critzer, Mar 31 2014 *)
  • PARI
    a(n)=1+sum(k=2,(n+3)\2,k*sum(s=1,(n-1)\k,binomial(n-k*s-1,k-2))) (Alekseyev)

Formula

G.f.: Sum_{k>0} k * x^(2*k-1)/((1 - x^k) * (1 - x)^(k-1)) = (1 - x)^2 * Sum_{k>0} x^k/(1 - x - x^(k+1))^2.
a(n) = 1 + sum(k=2..[(n+3)/2], k * sum(s=1..[(n-1)/k], binomial(n-k*s-1, k-2) ) ). - Max Alekseyev, Apr 15 2005
a(n) ~ (2*sqrt(5)-4)/10 * n * ((1+sqrt(5))/2)^n. - Vaclav Kotesovec, May 02 2014
Equivalently, a(n) ~ n * phi^(n-3) / 5, where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 07 2021

Extensions

More terms from Emeric Deutsch and Max Alekseyev, Apr 13 2005

A097941 Total number of smallest parts in all compositions of n.

Original entry on oeis.org

1, 3, 6, 15, 31, 72, 155, 340, 738, 1595, 3424, 7335, 15642, 33243, 70432, 148808, 313571, 659188, 1382682, 2894369, 6047397, 12613209, 26265098, 54610722, 113387831, 235117449, 486933645, 1007290340, 2081469759, 4296789924, 8861401891, 18258651137, 37589337434
Offset: 1

Views

Author

Vladeta Jovovic, Sep 05 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Drop[ CoefficientList[ Series[(1 - x)^2*Sum[x^k/(1 - x - x^k)^2, {k, 50}], {x, 0, 30}], x], 1] (* Robert G. Wilson v, Sep 08 2004 *)

Formula

G.f.: (1-x)^2 * Sum_{k>=1} x^k/(1-x-x^k)^2.
a(n) ~ n*2^(n-3). - Vaclav Kotesovec, Apr 30 2014
a(n) = Sum_{k=0..n} k * A238342(n,k). - Alois P. Heinz, Oct 15 2024

Extensions

More terms from Robert G. Wilson v, Sep 08 2004

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

A232665 Number of compositions of 2n such that the largest multiplicity of parts equals n.

Original entry on oeis.org

1, 1, 4, 5, 21, 49, 176, 513, 1720, 5401, 17777, 57421, 188657, 617177, 2033176, 6697745, 22139781, 73262233, 242931322, 806516561, 2681475049, 8925158441, 29740390673, 99196158145, 331163178476, 1106489052969, 3699881730901, 12380449027325, 41454579098853
Offset: 0

Views

Author

Alois P. Heinz, Nov 27 2013

Keywords

Comments

a(n) = A238342(2n,n) = A242447(2n,n).

Examples

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

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
         `if`(n<5, [1, 1, 4, 5, 21][n+1],
          ((n-1)*(14911*n^4 -102036*n^3 +249203*n^2
           -252880*n +87794) *a(n-1)
          +(27528*n^5 -239548*n^4 +803564*n^3 -1283816*n^2
           +963472*n -266160) *a(n-2)
          -2*(2*n-5)*(10323*n^4 -62876*n^3 +136848*n^2
           -125584*n +40329) *a(n-3)
          +2*(2*n-7)*(n-2)*(1147*n^3 -4055*n^2 +4742*n
           -1762) *a(n-4)) / (5*(n-1)*n*
          (1147*n^3 -7496*n^2 +16293*n -11706)))
        end:
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Feb 09 2015, after A238342 *)

Formula

Recurrence: see Maple program.
a(n) ~ c*r^n/sqrt(Pi*n), where r = 3.408698199842151... is the root of the equation 4 - 32*r - 8*r^2 + 5*r^3 = 0 and c = 0.479880052557486135... is the root of the equation 1 + 384*c^2 - 2368*c^4 + 2960*c^6 = 0. - Vaclav Kotesovec, Nov 27 2013

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}]

A241862 Number of compositions of n such that the smallest part has multiplicity two.

Original entry on oeis.org

1, 0, 4, 3, 10, 18, 35, 60, 121, 217, 391, 709, 1281, 2283, 4061, 7185, 12680, 22291, 39051, 68191, 118767, 206331, 357596, 618345, 1066983, 1837513, 3158685, 5420335, 9286086, 15884155, 27130404, 46274560, 78822938, 134095757, 227853408, 386721362, 655639944
Offset: 2

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 30 2014

Keywords

Crossrefs

Column k=2 of A238342.
Cf. A001622.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1,
          `if`(nadd(coeff(p, x, i)*binomial(i+k, k),
           i=0..degree(p)))(b(n-j*k, j+1)), j=1..n/k)
        end:
    seq(a(n), n=2..40);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Nov 07 2014, after Maple *)

Formula

a(n) ~ (1/4 - 11/(20*sqrt(5))) * n^2 * ((1+sqrt(5))/2)^n. - Vaclav Kotesovec, May 01 2014
Equivalently, a(n) ~ n^2 * phi^(n-5) / (2 * 5^(3/2)), where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 06 2021

A241863 Number of compositions of n such that the smallest part has multiplicity three.

Original entry on oeis.org

1, 0, 4, 5, 14, 24, 59, 108, 213, 419, 808, 1522, 2872, 5366, 9960, 18362, 33660, 61364, 111375, 201273, 362225, 649413, 1160289, 2066355, 3668840, 6495542, 11469453, 20201295, 35496670, 62233609, 108878818, 190103797, 331292391, 576296824, 1000766991
Offset: 3

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 30 2014

Keywords

Crossrefs

Column k=3 of A238342.
Cf. A001622.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1,
          `if`(nadd(coeff(p, x, i)*binomial(i+k, k),
           i=0..degree(p)))(b(n-j*k, j+1)), j=1..n/k)
        end:
    seq(a(n), n=3..40);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 0, 1, If[nJean-François Alcover, Feb 09 2015, after Maple *)

Formula

a(n) ~ (13*sqrt(5)-29)/300 * n^3 * ((1+sqrt(5))/2)^n. - Vaclav Kotesovec, May 01 2014
Equivalently, a(n) ~ n^3 * phi^(n-7) / 150, where phi = A001622 is the golden ratio. - Vaclav Kotesovec, Dec 06 2021
Showing 1-10 of 18 results. Next