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

A373949 Triangle read by rows where T(n,k) is the number of integer compositions of n such that replacing each run of repeated parts with a single part (run-compression) yields a composition of k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 0, 3, 0, 1, 1, 2, 4, 0, 1, 0, 4, 4, 7, 0, 1, 1, 5, 6, 5, 14, 0, 1, 0, 6, 10, 10, 14, 23, 0, 1, 1, 6, 14, 12, 29, 26, 39, 0, 1, 0, 9, 16, 19, 40, 54, 46, 71, 0, 1, 1, 8, 22, 22, 64, 82, 96, 92, 124, 0, 1, 0, 10, 26, 30, 82, 137, 144, 204, 176, 214
Offset: 0

Views

Author

Gus Wiseman, Jun 28 2024

Keywords

Examples

			Triangle begins:
   1
   0   1
   0   1   1
   0   1   0   3
   0   1   1   2   4
   0   1   0   4   4   7
   0   1   1   5   6   5  14
   0   1   0   6  10  10  14  23
   0   1   1   6  14  12  29  26  39
   0   1   0   9  16  19  40  54  46  71
   0   1   1   8  22  22  64  82  96  92 124
   0   1   0  10  26  30  82 137 144 204 176 214
   0   1   1  11  32  31 121 186 240 331 393 323 378
Row n = 6 counts the following compositions:
  .  (111111)  (222)  (33)     (3111)   (411)   (6)
                      (2211)   (1113)   (114)   (51)
                      (1122)   (1221)   (1311)  (15)
                      (21111)  (12111)  (1131)  (42)
                      (11112)  (11211)  (2112)  (24)
                               (11121)          (141)
                                                (321)
                                                (312)
                                                (231)
                                                (213)
                                                (132)
                                                (123)
                                                (2121)
                                                (1212)
For example, the composition (1,2,2,1) with compression (1,2,1) is counted under T(6,4).
		

Crossrefs

Column k = n is A003242 (anti-runs or compressed compositions).
Row-sums are A011782.
Same as A373951 with rows reversed.
Column k = 3 is A373952.
This statistic is represented by A373953, difference A373954.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by compressed length A116608.
A124767 counts runs in standard compositions, anti-runs A333381.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373948 represents the run-compression transformation.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#]]==k&]], {n,0,10},{k,0,n}]
  • PARI
    T_xy(row_max) = {my(N=row_max+1, x='x+O('x^N), h=1/(1-sum(i=1,N, (y^i*x^i)/(1+x^i*(y^i-1))))); vector(N, n, Vecrev(polcoeff(h, n-1)))}
    T_xy(13) \\ John Tyler Rascoe, Mar 20 2025

Formula

G.f.: 1/(1 - Sum_{i>0} (y^i * x^i)/(1 + x^i * (y^i - 1))). - John Tyler Rascoe, Mar 20 2025

A373948 Run-compression encoded as a transformation of compositions in standard order.

Original entry on oeis.org

0, 1, 2, 1, 4, 5, 6, 1, 8, 9, 2, 5, 12, 13, 6, 1, 16, 17, 18, 9, 20, 5, 22, 5, 24, 25, 6, 13, 12, 13, 6, 1, 32, 33, 34, 17, 4, 37, 38, 9, 40, 41, 2, 5, 44, 45, 22, 5, 48, 49, 50, 25, 52, 13, 54, 13, 24, 25, 6, 13, 12, 13, 6, 1, 64, 65, 66, 33, 68, 69, 70, 17, 72
Offset: 0

Views

Author

Gus Wiseman, Jun 24 2024

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).
For the present sequence, the a(n)-th composition in standard order is obtained by compressing the n-th composition in standard order.

Examples

			The standard compositions and their compressions begin:
   0: ()        -->  0: ()
   1: (1)       -->  1: (1)
   2: (2)       -->  2: (2)
   3: (1,1)     -->  1: (1)
   4: (3)       -->  4: (3)
   5: (2,1)     -->  5: (2,1)
   6: (1,2)     -->  6: (1,2)
   7: (1,1,1)   -->  1: (1)
   8: (4)       -->  8: (4)
   9: (3,1)     -->  9: (3,1)
  10: (2,2)     -->  2: (2)
  11: (2,1,1)   -->  5: (2,1)
  12: (1,3)     --> 12: (1,3)
  13: (1,2,1)   --> 13: (1,2,1)
  14: (1,1,2)   -->  6: (1,2)
  15: (1,1,1,1) -->  1: (1)
		

Crossrefs

Positions of 1's are A000225.
The image is A333489, counted by A003242.
Sum of standard composition for a(n) is given by A373953, length A124767.
A037201 gives compression of first differences of primes, halved A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by compressed sum, by length A116608.
A240085 counts compositions with no unique parts.
A333755 counts compositions by compressed length.
A373949 counts compositions by compressed sum, opposite A373951.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[stcinv[First/@Split[stc[n]]],{n,0,30}]

Formula

A029837(a(n)) = A373953(n).
A000120(a(n)) = A124767(n).

A373953 Sum of run-compression of the n-th integer composition in standard order.

Original entry on oeis.org

0, 1, 2, 1, 3, 3, 3, 1, 4, 4, 2, 3, 4, 4, 3, 1, 5, 5, 5, 4, 5, 3, 5, 3, 5, 5, 3, 4, 4, 4, 3, 1, 6, 6, 6, 5, 3, 6, 6, 4, 6, 6, 2, 3, 6, 6, 5, 3, 6, 6, 6, 5, 6, 4, 6, 4, 5, 5, 3, 4, 4, 4, 3, 1, 7, 7, 7, 6, 7, 7, 7, 5, 7, 4, 5, 6, 7, 7, 6, 4, 7, 7, 7, 6, 5, 3, 5
Offset: 0

Views

Author

Gus Wiseman, Jun 25 2024

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).

Examples

			The standard compositions and their compressions and compression sums begin:
   0: ()        --> ()      --> 0
   1: (1)       --> (1)     --> 1
   2: (2)       --> (2)     --> 2
   3: (1,1)     --> (1)     --> 1
   4: (3)       --> (3)     --> 3
   5: (2,1)     --> (2,1)   --> 3
   6: (1,2)     --> (1,2)   --> 3
   7: (1,1,1)   --> (1)     --> 1
   8: (4)       --> (4)     --> 4
   9: (3,1)     --> (3,1)   --> 4
  10: (2,2)     --> (2)     --> 2
  11: (2,1,1)   --> (2,1)   --> 3
  12: (1,3)     --> (1,3)   --> 4
  13: (1,2,1)   --> (1,2,1) --> 4
  14: (1,1,2)   --> (1,2)   --> 3
  15: (1,1,1,1) --> (1)     --> 1
		

Crossrefs

Positions of 1's are A000225.
Counting partitions by this statistic gives A116861, by length A116608.
For length instead of sum we have A124767, counted by A238279 and A333755.
Compositions counted by this statistic are A373949, opposite A373951.
A037201 gives compression of first differences of primes, halved A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A240085 counts compositions with no unique parts.
A333489 ranks anti-runs, counted by A003242.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[First/@Split[stc[n]]],{n,0,100}]

Formula

a(n) = A029837(A373948(n)).

A373954 Excess run-compression of standard compositions. Sum of all parts minus sum of compressed parts of the n-th integer composition in standard order.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 1, 3, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 2, 1, 1, 1, 2, 4, 0, 0, 0, 1, 3, 0, 0, 2, 0, 0, 4, 3, 0, 0, 1, 3, 0, 0, 0, 1, 0, 2, 0, 2, 1, 1, 3, 2, 2, 2, 3, 5, 0, 0, 0, 1, 0, 0, 0, 2, 0, 3, 2, 1, 0, 0, 1, 3, 0, 0, 0, 1, 2, 4, 2
Offset: 0

Views

Author

Gus Wiseman, Jun 27 2024

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
We define the (run-) compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has compression (1,2,1).

Examples

			The excess compression of (2,1,1,3) is 1, so a(92) = 1.
		

Crossrefs

For length instead of sum we have A124762, counted by A106356.
The opposite for length is A124767, counted by A238279 and A333755.
Positions of zeros are A333489, counted by A003242.
Positions of nonzeros are A348612, counted by A131044.
Compositions counted by this statistic are A373951, opposite A373949.
Compression of standard compositions is A373953.
Positions of ones are A373955.
A037201 gives compression of first differences of primes, halved A373947.
A066099 lists the parts of all compositions in standard order.
A114901 counts compositions with no isolated parts.
A116861 counts partitions by this statistic, by length A116608.
A240085 counts compositions with no unique parts.
A333627 takes the rank of a composition to the rank of its run-lengths.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[stc[n]]-Total[First/@Split[stc[n]]],{n,0,100}]

Formula

a(n) = A029837(n) - A373953(n).

A374251 Irregular triangle read by rows where row n is the run-compression of the n-th composition in standard order.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 1, 2, 1, 4, 3, 1, 2, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 5, 4, 1, 3, 2, 3, 1, 2, 3, 2, 1, 2, 1, 2, 2, 1, 1, 4, 1, 3, 1, 1, 2, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 6, 5, 1, 4, 2, 4, 1, 3, 3, 2, 1, 3, 1, 2, 3, 1, 2, 4, 2, 3, 1, 2, 2, 1, 2, 1, 3
Offset: 1

Views

Author

Gus Wiseman, Jul 09 2024

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The standard compositions and their run-compressions begin:
   0: ()        --> ()
   1: (1)       --> (1)
   2: (2)       --> (2)
   3: (1,1)     --> (1)
   4: (3)       --> (3)
   5: (2,1)     --> (2,1)
   6: (1,2)     --> (1,2)
   7: (1,1,1)   --> (1)
   8: (4)       --> (4)
   9: (3,1)     --> (3,1)
  10: (2,2)     --> (2)
  11: (2,1,1)   --> (2,1)
  12: (1,3)     --> (1,3)
  13: (1,2,1)   --> (1,2,1)
  14: (1,1,2)   --> (1,2)
  15: (1,1,1,1) --> (1)
		

Crossrefs

Last column is A001511.
First column is A065120.
Row-lengths are A124767.
Using prime indices we get A304038, row-sums A066328.
Row n has A334028(n) distinct elements.
Rows are ranked by A373948 (standard order).
Row-sums are A373953.
A003242 counts run-compressed compositions, i.e., anti-runs, ranks A333489.
A007947 (squarefree kernel) represents run-compression of multisets.
A037201 run-compresses first differences of primes, halved A373947.
A066099 lists the parts of compositions in standard order.
A116861 counts partitions by sum of run-compression.
A238279 and A333755 count compositions by number of runs.
A373949 counts compositions by sum of run-compression, opposite A373951.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[First/@Split[stc[n]],{n,100}]

A374761 Number of integer compositions of n whose leaders of strictly decreasing runs are distinct.

Original entry on oeis.org

1, 1, 1, 3, 5, 7, 13, 27, 45, 73, 117, 205, 365, 631, 1061, 1711, 2777, 4599, 7657, 12855, 21409, 35059, 56721, 91149, 146161, 234981, 379277, 612825, 988781, 1587635, 2533029, 4017951, 6342853, 9985087, 15699577, 24679859, 38803005, 60979839, 95698257, 149836255
Offset: 0

Views

Author

Gus Wiseman, Jul 29 2024

Keywords

Comments

The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.

Examples

			The composition (3,1,4,3,2,1,2,8) has strictly decreasing runs ((3,1),(4,3,2,1),(2),(8)), with leaders (3,4,2,8), so is counted under a(24).
The a(0) = 1 through a(6) = 13 compositions:
  ()  (1)  (2)  (3)   (4)    (5)    (6)
                (12)  (13)   (14)   (15)
                (21)  (31)   (23)   (24)
                      (121)  (32)   (42)
                      (211)  (41)   (51)
                             (131)  (123)
                             (311)  (132)
                                    (141)
                                    (213)
                                    (231)
                                    (312)
                                    (321)
                                    (411)
		

Crossrefs

For leaders of identical runs we have A274174, ranked by A374249.
The weak opposite version is A374632, ranks A374768.
The opposite version is A374687, ranks A374698.
For identical instead of distinct leaders we have A374760, ranks A374759.
The weak version is A374743, ranks A374701.
Ranked by A374767.
For partitions instead of compositions we have A375133.
Other types of runs:
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of anti-runs we have A374518, ranked by A374638.
Other types of run-leaders:
- For strictly increasing leaders we have A374762.
- For strictly decreasing leaders we have A374763.
- For weakly increasing leaders we have A374764.
- For weakly decreasing leaders we have A374765.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A373949 counts compositions by run-compressed sum, opposite A373951.
A374700 counts compositions by sum of leaders of strictly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],UnsameQ@@First/@Split[#,Greater]&]],{n,0,15}]
  • PARI
    dfs(m, r, v) = 1 + sum(s=r, m, if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s + sum(t=1, min(s-1, m-s), dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)*prod(i=t+1, s-1, 1+x^i))));
    lista(nn) = Vec(dfs(nn, 1, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374687 Number of integer compositions of n whose leaders of strictly increasing runs are distinct.

Original entry on oeis.org

1, 1, 1, 3, 3, 7, 11, 15, 27, 45, 65, 101, 161, 251, 381, 573, 865, 1321, 1975, 2965, 4387, 6467, 9579, 14091, 20669, 30135, 43869, 63531, 91831, 132575, 190567, 273209, 390659, 557069, 792371, 1124381, 1591977, 2249029, 3169993, 4458163, 6256201, 8762251, 12246541
Offset: 0

Views

Author

Gus Wiseman, Jul 27 2024

Keywords

Comments

The leaders of strictly increasing runs in a sequence are obtained by splitting it into maximal strictly increasing subsequences and taking the first term of each.

Examples

			The a(0) = 1 through a(7) = 15 compositions:
  ()  (1)  (2)  (3)   (4)   (5)    (6)    (7)
                (12)  (13)  (14)   (15)   (16)
                (21)  (31)  (23)   (24)   (25)
                            (32)   (42)   (34)
                            (41)   (51)   (43)
                            (122)  (123)  (52)
                            (212)  (132)  (61)
                                   (213)  (124)
                                   (231)  (133)
                                   (312)  (142)
                                   (321)  (214)
                                          (241)
                                          (313)
                                          (412)
                                          (421)
		

Crossrefs

Ranked by A374698.
Types of runs (instead of strictly increasing):
- For leaders of identical runs we have A274174 for n > 0, ranks A374249.
- For leaders of anti-runs we have A374518, ranks A374638.
- For leaders of weakly increasing runs we have A374632, ranks A374768.
- For leaders of weakly decreasing runs we have A374743, ranks A374701.
- For leaders of strictly decreasing runs we have A374761, ranks A374767.
Types of run-leaders (instead of distinct):
- For identical leaders we have A374686, ranks A374685.
- For strictly increasing leaders we have A374688.
- For strictly decreasing leaders we have A374689.
- For weakly increasing leaders we have A374690.
- For weakly decreasing leaders we have A374697.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
A373949 counts compositions by run-compressed sum, opposite A373951.
A374683 lists leaders of strictly increasing runs of standard compositions.
A374700 counts compositions by sum of leaders of strictly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],UnsameQ@@First/@Split[#,Less]&]],{n,0,15}]
  • PARI
    dfs(m, r, v) = 1 + sum(s=1, min(m, r), if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s + sum(t=s+1, m-s, dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)*prod(i=s+1, t-1, 1+x^i))));
    lista(nn) = Vec(dfs(nn, nn, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374630 Sum of leaders of weakly increasing runs in the n-th composition in standard order.

Original entry on oeis.org

0, 1, 2, 1, 3, 3, 1, 1, 4, 4, 2, 3, 1, 2, 1, 1, 5, 5, 5, 4, 2, 3, 3, 3, 1, 2, 1, 2, 1, 2, 1, 1, 6, 6, 6, 5, 3, 6, 4, 4, 2, 3, 2, 3, 3, 4, 3, 3, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 7, 7, 7, 6, 7, 7, 5, 5, 3, 4, 5, 6, 4, 5, 4, 4, 2, 3, 4, 3, 2, 3, 3
Offset: 0

Views

Author

Gus Wiseman, Jul 20 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The maximal weakly increasing subsequences of the 1234567th composition in standard order are ((3),(2),(1,2,2),(1,2,5),(1,1,1)), so a(1234567) = 8.
		

Crossrefs

For length instead of sum we have A124766.
For leaders of constant runs we have A373953, excess A373954.
For leaders of anti-runs we have A374516.
Row-sums of A374629.
Counting compositions by this statistic gives A374637.
For leaders of strictly increasing runs we have A374684.
For leaders of weakly decreasing runs we have A374741.
For leaders of strictly decreasing runs we have A374758
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
A373949 counts compositions by run-compressed sum, opposite A373951.
All of the following pertain to compositions in standard order:
- Ones are counted by A000120.
- Sum is A029837 (or sometimes A070939).
- Listed by A066099.
- Length is A070939.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564, counted by A032020.
- Constant compositions are ranked by A272919.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627.
- Run-compression transform is A373948.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[First/@Split[stc[n],LessEqual]],{n,0,100}]

A374742 Number of integer compositions of n whose leaders of weakly decreasing runs are identical.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 13, 21, 34, 54, 87, 138, 220, 349, 556, 881, 1403, 2229, 3551, 5653, 9019, 14387, 22988, 36739, 58785, 94100, 150765, 241658, 387617, 622002, 998658, 1604032, 2577512, 4143243, 6662520, 10716931, 17243904, 27753518, 44680121, 71947123, 115880662
Offset: 0

Views

Author

Gus Wiseman, Jul 25 2024

Keywords

Comments

The weakly decreasing run-leaders of a sequence are obtained by splitting into maximal weakly decreasing subsequences and taking the first term of each.

Examples

			The composition (3,1,3,2,1,3,3) has maximal weakly decreasing subsequences ((3,1),(3,2,1),(3,3)), with leaders (3,3,3), so is counted under a(16).
The a(0) = 1 through a(6) = 13 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (21)   (22)    (32)     (33)
                 (111)  (31)    (41)     (42)
                        (211)   (212)    (51)
                        (1111)  (221)    (222)
                                (311)    (321)
                                (2111)   (411)
                                (11111)  (2112)
                                         (2121)
                                         (2211)
                                         (3111)
                                         (21111)
                                         (111111)
		

Crossrefs

Ranked by A374744 = positions of identical rows in A374740, cf. A374629.
Types of runs (instead of weakly decreasing):
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of anti-runs we have A374517, ranks A374519.
- For leaders of strictly increasing runs we have A374686, ranks A374685.
- For leaders of weakly increasing runs we have A374631, ranks A374633.
- For leaders of strictly decreasing runs we have A374760, ranks A374759.
Types of run-leaders (instead of identical):
- For strictly decreasing leaders we have A374746.
- For weakly decreasing leaders we have A374747.
- For distinct leaders we have A374743, ranks A374701.
- For weakly increasing leaders we appear to have A188900.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A373949 counts compositions by run-compressed sum, opposite A373951.
A374748 counts compositions by sum of leaders of weakly decreasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],SameQ@@First/@Split[#,GreaterEqual]&]],{n,0,15}]
  • PARI
    B(i) = x^i/(1-x^i) * sum(j=1,i-1, x^j*prod(k=1,j, (1-x^k)^(-1)))
    A_x(N) = {my(x='x+O('x^N)); Vec(1+sum(i=1,N,-1+(1+x^i/(1-x^i))/(1-B(i))))}
    A_x(30) \\ John Tyler Rascoe, Apr 29 2025

Formula

G.f.: 1 + Sum_{i>0} -1 + (1 + x^i/(1 - x^i))/(1 - B(i,x)) where B(i,x) = x^i/(1 - x^i) * Sum_{j=1..i-1} x^j * Product_{k=1..j} (1 - x^k)^(-1). - John Tyler Rascoe, Apr 29 2025

Extensions

a(24)-a(40) from Alois P. Heinz, Jul 26 2024

A374686 Number of integer compositions of n whose leaders of strictly increasing runs are identical.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 17, 29, 51, 91, 162, 291, 523, 948, 1712, 3112, 5656, 10297, 18763, 34217, 62442, 114006, 208239, 380465, 695342, 1271046, 2323818, 4249113, 7770389, 14210991, 25991853, 47541734, 86962675, 159077005, 291001483, 532345978, 973871397
Offset: 0

Views

Author

Gus Wiseman, Jul 27 2024

Keywords

Comments

The leaders of strictly increasing runs in a sequence are obtained by splitting it into maximal strictly increasing subsequences and taking the first term of each.
Also the number of ways to choose a strict integer partition of each part of an integer composition of n (A304969) such that the minima are identical. For maxima instead of minima we have A374760. For all partitions (not just strict) we have A374704, for maxima A358905.

Examples

			The composition (2,3,2,2,3,4) has strictly increasing runs ((2,3),(2),(2,3,4)), with leaders (2,2,2), so is counted under a(16).
The a(0) = 1 through a(6) = 17 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (12)   (13)    (14)     (15)
                 (111)  (22)    (23)     (24)
                        (112)   (113)    (33)
                        (121)   (131)    (114)
                        (1111)  (1112)   (123)
                                (1121)   (141)
                                (1211)   (222)
                                (11111)  (1113)
                                         (1131)
                                         (1212)
                                         (1311)
                                         (11112)
                                         (11121)
                                         (11211)
                                         (12111)
                                         (111111)
		

Crossrefs

Ranked by A374685.
Types of runs (instead of strictly increasing):
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of anti-runs we have A374517, ranks A374519.
- For leaders of weakly increasing runs we have A374631, ranks A374633.
- For leaders of weakly decreasing runs we have A374742, ranks A374744.
- For leaders of strictly decreasing runs we have A374760, ranks A374759.
Types of run-leaders (instead of identical):
- For distinct leaders we have A374687, ranks A374698.
- For strictly increasing leaders we have A374688.
- For strictly decreasing leaders we have A374689.
- For weakly increasing leaders we have A374690.
- For weakly decreasing leaders we have A374697.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A373949 counts compositions by run-compressed sum, opposite A373951.
A374683 lists leaders of strictly increasing runs of standard compositions.
A374700 counts compositions by sum of leaders of strictly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],SameQ@@First/@Split[#,Less]&]],{n,0,15}]
  • PARI
    seq(n) = Vec(1 + sum(k=1, n, 1/(1 - x^k*prod(j=k+1, n-k, 1 + x^j, 1 + O(x^(n-k+1))))-1)) \\ Andrew Howroyd, Jul 27 2024

Extensions

a(26) onwards from Andrew Howroyd, Jul 27 2024
Showing 1-10 of 36 results. Next