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

A374629 Irregular triangle listing the leaders of maximal weakly increasing runs in the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 20 2024

Keywords

Comments

The leaders of maximal 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 58654th composition in standard order is (1,1,3,2,4,1,1,1,2), with maximal weakly increasing runs ((1,1,3),(2,4),(1,1,1,2)), so row 58654 is (1,2,1).
The nonnegative integers, corresponding compositions, and leaders of maximal weakly increasing runs begin:
    0:      () -> ()      15: (1,1,1,1) -> (1)
    1:     (1) -> (1)     16:       (5) -> (5)
    2:     (2) -> (2)     17:     (4,1) -> (4,1)
    3:   (1,1) -> (1)     18:     (3,2) -> (3,2)
    4:     (3) -> (3)     19:   (3,1,1) -> (3,1)
    5:   (2,1) -> (2,1)   20:     (2,3) -> (2)
    6:   (1,2) -> (1)     21:   (2,2,1) -> (2,1)
    7: (1,1,1) -> (1)     22:   (2,1,2) -> (2,1)
    8:     (4) -> (4)     23: (2,1,1,1) -> (2,1)
    9:   (3,1) -> (3,1)   24:     (1,4) -> (1)
   10:   (2,2) -> (2)     25:   (1,3,1) -> (1,1)
   11: (2,1,1) -> (2,1)   26:   (1,2,2) -> (1)
   12:   (1,3) -> (1)     27: (1,2,1,1) -> (1,1)
   13: (1,2,1) -> (1,1)   28:   (1,1,3) -> (1)
   14: (1,1,2) -> (1)     29: (1,1,2,1) -> (1,1)
		

Crossrefs

Row-leaders are A065120.
Row-lengths are A124766.
Row-sums are A374630.
Positions of constant rows are A374633, counted by A374631.
Positions of strict rows are A374768, counted by A374632.
For other types of runs we have A374251, A374515, A374683, A374740, A374757.
Positions of non-weakly decreasing rows are A375137.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099, reverse A228351.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627, length A124767, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Ranks of non-contiguous compositions are A374253, counted by A335548.

Programs

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

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

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)).

A037201 Differences between consecutive primes (A001223) but with repeats omitted.

Original entry on oeis.org

1, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 14, 4, 6, 2, 10, 2, 6, 4, 6, 2, 10, 2, 4, 2, 12, 4, 2, 4, 6, 2, 10, 6, 2, 6, 4, 2, 10, 14, 4, 2, 4, 14, 6, 10, 2, 4, 6, 8, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6, 4, 6, 8, 4
Offset: 1

Views

Author

Keywords

Comments

Also the run-compression of the sequence of first differences of prime numbers, where 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, we can remove all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1). - Gus Wiseman, Sep 16 2024

Crossrefs

This is the run-compression of A001223 = first differences of A000040.
The repeats were at positions A064113 before being omitted.
Adding up runs instead of compressing them gives A373822.
The even terms halved are A373947.
For prime-powers instead of prime numbers we have A376308.
Positions of first appearances are A376520, sorted A376521.
A003242 counts compressed compositions.
A333254 lists run-lengths of differences between consecutive primes.
A373948 encodes compression using compositions in standard order.

Programs

  • Haskell
    a037201 n = a037201_list !! (n-1)
    a037201_list = f a001223_list where
       f (x:xs@(x':_)) | x == x'   = f xs
                       | otherwise = x : f xs
    -- Reinhard Zumkeller, Feb 27 2012
    
  • Mathematica
    Flatten[Split[Differences[Prime[Range[150]]]]/.{(k_)..}:>k] (* based on a program by Harvey P. Dale, Jun 21 2012 *)
  • PARI
    t=0;p=2;forprime(q=3,1e3,if(q-p!=t,print1(q-p", "));t=q-p;p=q) \\ Charles R Greathouse IV, Feb 27 2012

Formula

a(n>1) = 2*A373947(n-1). - Gus Wiseman, Sep 16 2024

Extensions

Offset corrected by Reinhard Zumkeller, Feb 27 2012

A374683 Irregular triangle read by rows where row n lists the leaders of strictly increasing runs in the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 26 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.
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 strictly increasing subsequences of the 1234567th composition in standard order are ((3),(2),(1,2),(2),(1,2,5),(1),(1),(1)), so row 1234567 is (3,2,1,2,1,1,1,1).
The nonnegative integers, corresponding compositions, and leaders of strictly increasing runs begin:
   0:      () -> ()         15: (1,1,1,1) -> (1,1,1,1)
   1:     (1) -> (1)        16:       (5) -> (5)
   2:     (2) -> (2)        17:     (4,1) -> (4,1)
   3:   (1,1) -> (1,1)      18:     (3,2) -> (3,2)
   4:     (3) -> (3)        19:   (3,1,1) -> (3,1,1)
   5:   (2,1) -> (2,1)      20:     (2,3) -> (2)
   6:   (1,2) -> (1)        21:   (2,2,1) -> (2,2,1)
   7: (1,1,1) -> (1,1,1)    22:   (2,1,2) -> (2,1)
   8:     (4) -> (4)        23: (2,1,1,1) -> (2,1,1,1)
   9:   (3,1) -> (3,1)      24:     (1,4) -> (1)
  10:   (2,2) -> (2,2)      25:   (1,3,1) -> (1,1)
  11: (2,1,1) -> (2,1,1)    26:   (1,2,2) -> (1,2)
  12:   (1,3) -> (1)        27: (1,2,1,1) -> (1,1,1)
  13: (1,2,1) -> (1,1)      28:   (1,1,3) -> (1,1)
  14: (1,1,2) -> (1,1)      29: (1,1,2,1) -> (1,1,1)
		

Crossrefs

Row-leaders are A065120.
Row-lengths are A124768.
Other types of runs: A374251, A374515, A374740.
The weak version is A374629, sum A374630, length A124766.
Row-sums are A374684.
Positions of identical rows are A374685, counted by A374686.
Positions of distinct (strict) rows are A374698, counted by A374687.
The opposite version is A374757, sum A374758, length A124769.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) (or sometimes A070939).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124767, A333381.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Ranks of non-contiguous compositions are A374253, counted by A335548.

Programs

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

A374740 Irregular triangle read by rows where row n lists the leaders of weakly decreasing runs in the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 24 2024

Keywords

Comments

The leaders of weakly decreasing runs in a sequence are obtained by splitting it into maximal weakly decreasing 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 decreasing subsequences of the 1234567th composition in standard order are ((3,2,1),(2,2,1),(2),(5,1,1,1)), so row 1234567 is (3,2,2,5).
The nonnegative integers, corresponding compositions, and leaders of weakly decreasing runs begin:
    0: () -> ()           15: (1,1,1,1) -> (1)
    1: (1) -> (1)         16: (5) -> (5)
    2: (2) -> (2)         17: (4,1) -> (4)
    3: (1,1) -> (1)       18: (3,2) -> (3)
    4: (3) -> (3)         19: (3,1,1) -> (3)
    5: (2,1) -> (2)       20: (2,3) -> (2,3)
    6: (1,2) -> (1,2)     21: (2,2,1) -> (2)
    7: (1,1,1) -> (1)     22: (2,1,2) -> (2,2)
    8: (4) -> (4)         23: (2,1,1,1) -> (2)
    9: (3,1) -> (3)       24: (1,4) -> (1,4)
   10: (2,2) -> (2)       25: (1,3,1) -> (1,3)
   11: (2,1,1) -> (2)     26: (1,2,2) -> (1,2)
   12: (1,3) -> (1,3)     27: (1,2,1,1) -> (1,2)
   13: (1,2,1) -> (1,2)   28: (1,1,3) -> (1,3)
   14: (1,1,2) -> (1,2)   29: (1,1,2,1) -> (1,2)
		

Crossrefs

Row-leaders are A065120.
Row-lengths are A124765.
Other types of runs are A374251, A374515, A374683, A374757.
The opposite is A374629.
Positions of distinct (strict) rows are A374701, counted by A374743.
Row-sums are A374741, opposite A374630.
Positions of identical rows are A374744, counted by A374742.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1) (or sometimes A070939).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Ranks of non-contiguous compositions are A374253, counted by A335548.

Programs

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

A373951 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 n - k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 28 2024

Keywords

Examples

			Triangle begins:
    1
    1   0
    1   1   0
    3   0   1   0
    4   2   1   1   0
    7   4   4   0   1   0
   14   5   6   5   1   1   0
   23  14  10  10   6   0   1   0
   39  26  29  12  14   6   1   1   0
   71  46  54  40  19  16   9   0   1   0
  124  92  96  82  64  22  22   8   1   1   0
Row n = 6 counts the following compositions:
  (6)     (411)   (3111)   (33)     (222)  (111111)  .
  (51)    (114)   (1113)   (2211)
  (15)    (1311)  (1221)   (1122)
  (42)    (1131)  (12111)  (21111)
  (24)    (2112)  (11211)  (11112)
  (141)           (11121)
  (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,2).
		

Crossrefs

Column k = 0 is A003242 (anti-runs or compressed compositions).
Row-sums are A011782.
Same as A373949 with rows reversed.
Column k = 1 is A373950.
This statistic is represented by A373954, difference A373953.
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[#]]==n-k&]],{n,0,10},{k,0,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}]

A374515 Irregular triangle read by rows where row n lists the leaders of anti-runs in the n-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 31 2024

Keywords

Comments

Anti-runs summing to n are counted by A003242(n).
The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) 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 anti-runs of the 1234567th composition in standard order are ((3,2,1,2),(2,1,2,5,1),(1),(1)), so row 1234567 is (3,2,1,1).
The nonnegative integers, corresponding compositions, and leaders of anti-runs begin:
    0:      () -> ()        15: (1,1,1,1) -> (1,1,1,1)
    1:     (1) -> (1)       16:       (5) -> (5)
    2:     (2) -> (2)       17:     (4,1) -> (4)
    3:   (1,1) -> (1,1)     18:     (3,2) -> (3)
    4:     (3) -> (3)       19:   (3,1,1) -> (3,1)
    5:   (2,1) -> (2)       20:     (2,3) -> (2)
    6:   (1,2) -> (1)       21:   (2,2,1) -> (2,2)
    7: (1,1,1) -> (1,1,1)   22:   (2,1,2) -> (2)
    8:     (4) -> (4)       23: (2,1,1,1) -> (2,1,1)
    9:   (3,1) -> (3)       24:     (1,4) -> (1)
   10:   (2,2) -> (2,2)     25:   (1,3,1) -> (1)
   11: (2,1,1) -> (2,1)     26:   (1,2,2) -> (1,2)
   12:   (1,3) -> (1)       27: (1,2,1,1) -> (1,1)
   13: (1,2,1) -> (1)       28:   (1,1,3) -> (1,1)
   14: (1,1,2) -> (1,1)     29: (1,1,2,1) -> (1,1)
		

Crossrefs

Row-leaders of nonempty rows are A065120.
Row-lengths are A333381.
Row-sums are A374516.
Positions of identical rows are A374519 (counted by A374517).
Positions of distinct (strict) rows are A374638 (counted by A374518).
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
A238424 counts partitions whose first differences are an anti-run.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.
- Run-compression is A373948 or A374251, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
Six types of maximal runs:

Programs

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

A374768 Numbers k such that the leaders of weakly increasing runs in the k-th composition in standard order (A066099) are distinct.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 50, 52, 56, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81
Offset: 1

Views

Author

Gus Wiseman, Jul 19 2024

Keywords

Comments

First differs from A335467 in having 166, corresponding to the composition (2,3,1,2).
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 4444th composition in standard order is (4,2,2,1,1,3), with weakly increasing runs ((4),(2,2),(1,1,3)), with leaders (4,2,1), so 4444 is in the sequence.
		

Crossrefs

These are the positions of strict rows in A374629 (which has sums A374630).
Compositions of this type are counted by A374632, increasing A374634.
Identical instead of distinct leaders are A374633, counted by A374631.
For leaders of anti-runs we have A374638, counted by A374518.
For leaders of strictly increasing runs we have A374698, counted by A374687.
For leaders of weakly decreasing runs we have A374701, counted by A374743.
For leaders of strictly decreasing runs we have A374767, counted by A374761.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Ones are counted by A000120.
- Sum is A029837 (or sometimes A070939).
- Parts are listed by A066099.
- Length is A070939.
- Adjacent equal pairs are counted by A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564.
- Ranks of constant compositions are A272919.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627.
- Run-compression transform is A373948, sum A373953, excess A373954.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,166],UnsameQ@@First/@Split[stc[#],LessEqual]&]
Showing 1-10 of 55 results. Next