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

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

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

A377823 Sum of the positions of maximum parts in all compositions of n.

Original entry on oeis.org

0, 1, 4, 10, 23, 50, 110, 240, 526, 1147, 2489, 5368, 11510, 24543, 52090, 110109, 231959, 487245, 1020980, 2134838, 4455582, 9283742, 19314740, 40128699, 83265342, 172564435, 357228078, 738707908, 1526004117, 3149310585, 6493394292, 13376521031, 27532616663
Offset: 0

Views

Author

John Tyler Rascoe, Nov 08 2024

Keywords

Examples

			The composition of 7, (1,2,1,1,2) has maximum parts at positions 2 and 5; so it contributes 7 to a(7) = 240.
		

Crossrefs

Programs

  • PARI
    A_xy(N) = {my(x='x+O('x^N), h = sum(i=1,N, y^(i*(i+1)/2)*x^i)+sum(m=2,N, sum(i=1,N, ((y^i)*x^m)*((x-x^m)/(1-x))^(i-1)*(sum(j=0,N-m-i, prod(u=1,j, (x-x^m)/(1-x)+(y^(u+i))*x^m)))))); h}
    P_xy(N) = Pol(A_xy(N), {x})
    A_x(N) = {my(px = deriv(P_xy(N),y), y=1); Vecrev(eval(px))}
    A_x(20)

Formula

G.f.: A(x) = d/dy A(x,y)|{y = 1}, where A(x,y) = Sum{i>0} (x^i * y^(i*(i+1)/2)) + Sum_{m>1} (Sum_{i>0} (x^m * y^i * ((x-x^m)/(1-x))^(i-1) * (Sum_{j>=0} (Product_{u=1..j} ((x-x^m)/(1-x) + x^m * y^(u+i)) ) ) ) ).

A284942 Expansion of Sum_{k>=1} mu(k)^2*x^k*(1 - x)^2/(1 - 2*x)^2, where mu() is the Moebius function (A008683).

Original entry on oeis.org

1, 3, 8, 19, 46, 107, 244, 547, 1213, 2665, 5807, 12567, 27042, 57899, 123428, 262115, 554750, 1170538, 2463154, 5170462, 10829234, 22635087, 47223412, 98353299, 204519549, 424665001, 880581806, 1823667221, 3772341661, 7794697759, 16089424392, 33178906531, 68357928558
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2017

Keywords

Comments

Total number of squarefree parts in all compositions (ordered partitions) of n.

Examples

			a(4) = 19 because we have [4], [3, 1], [2, 2], [2, 1, 1], [1, 3], [1, 2, 1], [1, 1, 2], [1, 1, 1, 1] and 0 + 2 + 2 + 3 + 2 + 3 + 3 + 4 = 19.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; add(`if`(numtheory[
          issqrfree](j), ceil(2^(n-j-1)), 0)+a(n-j), j=1..n)
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 33; Rest[CoefficientList[Series[Sum[MoebiusMu[k]^2 x^k (1 - x)^2/(1 - 2 x)^2, {k, 1, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^34); Vec(sum(k=1, 34, moebius(k) ^2*x^k*(1 - x)^2/(1 - 2*x)^2)) \\ Indranil Ghosh, Apr 06 2017

Formula

G.f.: Sum_{k>=1} mu(k)^2*x^k*(1 - x)^2/(1 - 2*x)^2.

A284943 Expansion of Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.

Original entry on oeis.org

0, 1, 3, 8, 20, 47, 110, 251, 564, 1251, 2750, 5994, 12978, 27934, 59825, 127565, 270959, 573575, 1210466, 2547562, 5348385, 11203292, 23419629, 48865346, 101782870, 211670094, 439548898, 911515214, 1887865266, 3905400206, 8070139762, 16658958223, 34355273843
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2017

Keywords

Comments

Total number of prime power parts (1 excluded) in all compositions (ordered partitions) of n.

Examples

			a(5) = 20 because we have [5], [4, 1], [3, 2], [3, 1, 1], [2, 3], [2, 2, 1], [2, 1, 2], [2, 1, 1, 1], [1, 4], [1, 3, 1], [1, 2, 2], [1, 2, 1, 1], [1, 1, 3], [1, 1, 2, 1], [1, 1, 1, 2], [1, 1, 1, 1, 1] and 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 0 = 20.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; nops(ifactors(n)[2])=1 end:
    a:= proc(n) option remember; `if`(n=0, 0, add(a(n-j)+
          `if`(b(j), ceil(2^(n-j-1)), 0), j=1..n))
        end:
    seq(a(n), n=1..33);  # Alois P. Heinz, Aug 07 2019
  • Mathematica
    nmax = 33; Rest[CoefficientList[Series[Sum[Floor[1/PrimeNu[k]] x^k (1 - x)^2/(1 - 2 x)^2, {k, 2, nmax}], {x, 0, nmax}], x]]
  • PARI
    x='x+O('x^34); concat([0], Vec(sum(k=2, 34, (1\omega(k))*x^k*(1 - x)^2/(1 - 2*x)^2))) \\ Indranil Ghosh, Apr 06 2017

Formula

G.f.: Sum_{p prime, k>=1} x^(p^k)*(1 - x)^2/(1 - 2*x)^2.
Showing 1-10 of 12 results. Next