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-4 of 4 results.

A353853 Trajectory of the composition run-sum transformation (or condensation) of n, using standard composition numbers.

Original entry on oeis.org

0, 1, 2, 3, 2, 4, 5, 6, 7, 4, 8, 9, 10, 8, 11, 10, 8, 12, 13, 14, 10, 8, 15, 8, 16, 17, 18, 19, 18, 20, 21, 17, 22, 23, 20, 24, 25, 26, 24, 27, 26, 24, 28, 20, 29, 21, 17, 30, 18, 31, 16, 32, 33, 34, 35, 34, 36, 32, 37, 38, 39, 36, 32, 40, 41, 42, 32
Offset: 0

Views

Author

Gus Wiseman, Jun 01 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).
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.
The run-sum trajectory is obtained by repeatedly taking the run-sum transformation (A353847) until the rank of an anti-run is reached. For example, the trajectory 11 -> 10 -> 8 given in row 11 corresponds to the trajectory (2,1,1) -> (2,2) -> (4).

Examples

			Triangle begins:
   0
   1
   2
   3  2
   4
   5
   6
   7  4
   8
   9
  10  8
  11 10  8
  12
  13
  14 10  8
For example, the trajectory of 29 is 29 -> 21 -> 17, corresponding to the compositions (1,1,2,1) -> (2,2,1) -> (4,1).
		

Crossrefs

These sequences for partitions are A353840-A353846.
This is the iteration of A353847, with partition version A353832.
Row-lengths are A353854, counted by A353859.
Final terms are A353855.
Counting rows by weight of final term gives A353856.
Rows ending in a power of 2 are A353857, counted by A353858.
A003242 counts anti-run compositions, ranked by A333489, complement A261983.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A329739 counts compositions with all distinct run-lengths.
A333627 ranks the run-lengths of standard compositions.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353853-A353859 pertain to composition run-sum trajectory.
A353929 counts distinct runs in binary expansion, firsts A353930.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    stcinv[q_]:=Total[2^(Accumulate[Reverse[q]])]/2;
    Table[NestWhileList[stcinv[Total/@Split[stc[#]]]&,n,MatchQ[stc[#],{_,x_,x_,_}]&],{n,0,50}]

A353859 Triangle read by rows where T(n,k) is the number of integer compositions of n with composition run-sum trajectory of length k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 1, 0, 0, 4, 2, 2, 0, 0, 7, 7, 2, 0, 0, 0, 14, 14, 4, 0, 0, 0, 0, 23, 29, 12, 0, 0, 0, 0, 0, 39, 56, 25, 8, 0, 0, 0, 0, 0, 71, 122, 53, 10, 0, 0, 0, 0, 0, 0, 124, 246, 126, 16, 0, 0, 0, 0, 0, 0, 0, 214, 498, 264, 48, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). The run-sum trajectory is obtained by repeatedly taking the run-sums transformation (or condensation, represented by A353847) until an anti-run is reached. For example, the trajectory (2,4,2,1,1) -> (2,4,2,2) -> (2,4,4) -> (2,8) is counted under T(10,4).

Examples

			Triangle begins:
   1
   0   1
   0   1   1
   0   3   1   0
   0   4   2   2   0
   0   7   7   2   0   0
   0  14  14   4   0   0   0
   0  23  29  12   0   0   0   0
   0  39  56  25   8   0   0   0   0
   0  71 122  53  10   0   0   0   0   0
   0 124 246 126  16   0   0   0   0   0   0
   0 214 498 264  48   0   0   0   0   0   0   0
For example, row n = 5 counts the following compositions:
  (5)    (113)    (1121)
  (14)   (122)    (1211)
  (23)   (221)
  (32)   (311)
  (41)   (1112)
  (131)  (2111)
  (212)  (11111)
		

Crossrefs

Column k = 1 is A003242, ranked by A333489, complement A261983.
Row sums are A011782.
Positive row-lengths are A070939.
The version for partitions is A353846, ranked by A353841.
This statistic (trajectory length) is ranked by A353854, firsts A072639.
Counting by length of last part instead of number of parts gives A353856.
A333627 ranks the run-lengths of standard compositions.
A353847 represents the run-sums of a composition, partitions A353832.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    rsc[y_]:=If[y=={},{},NestWhileList[Total/@Split[#]&,y,MatchQ[#,{_,x_,x_,_}]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[rsc[#]]==k&]],{n,0,10},{k,0,n}]

A353858 Number of integer compositions of n with run-sum trajectory ending in a singleton.

Original entry on oeis.org

0, 1, 2, 2, 5, 2, 8, 2, 20, 5, 8, 2, 78, 2, 8, 8, 223, 2, 179, 2, 142, 8, 8, 2, 4808
Offset: 0

Views

Author

Gus Wiseman, Jun 17 2022

Keywords

Comments

Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4). The run-sum trajectory is obtained by repeatedly taking the run-sums (cf. A353847) until an anti-run composition (A003242) is reached. For example, the composition (2,2,1,1,2) is counted under a(8) because it has the following run-sum trajectory: (2,2,1,1,2) -> (4,2,2) -> (4,4) -> (8).

Examples

			The a(0) = 0 through a(8) = 20 compositions:
  .  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
          (11)  (111)  (22)    (11111)  (33)      (1111111)  (44)
                       (112)            (222)                (224)
                       (211)            (1113)               (422)
                       (1111)           (2112)               (1124)
                                        (3111)               (2114)
                                        (11211)              (2222)
                                        (111111)             (4112)
                                                             (4211)
                                                             (11114)
                                                             (21122)
                                                             (22112)
                                                             (41111)
                                                             (111122)
                                                             (112112)
                                                             (211211)
                                                             (221111)
                                                             (1111211)
                                                             (1121111)
                                                             (11111111)
		

Crossrefs

The version for partitions is A353845, ranked by A353844.
The trajectory itself is A353853, last part A353855.
The lengths of trajectories of standard compositions are A353854.
This is column k = 1 of A353856, for partitions A353843.
These compositions are ranked by A353857.
A011782 counts compositions.
A066099 lists compositions in standard order.
A238279 and A333755 count compositions by number of runs.
A275870 counts collapsible partitions, ranked by A300273.
A333489 ranks anti-runs, counted by A003242 (complement A261983).
A353840-A353846 pertain to partition run-sum trajectory.
A353847 represents the run-sums of a composition, partitions A353832.
A353851 counts compositions with equal run-sums, ranked by A353848.
A353859 counts compositions by length of run-sum trajectory.
A353860 counts collapsible compositions.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n], Length[FixedPoint[Total/@Split[#]&,#]]==1&]],{n,0,15}]

A353843 Irregular triangle read by rows where T(n,k) is the number of integer partitions of n with partition run-sum trajectory ending in a partition of length k. All zeros removed.

Original entry on oeis.org

1, 1, 2, 2, 1, 4, 1, 2, 5, 5, 5, 1, 2, 12, 1, 8, 11, 3, 3, 19, 8, 5, 27, 9, 1, 2, 34, 19, 1, 15, 26, 34, 2, 2, 49, 45, 5, 5, 68, 48, 14, 4, 58, 98, 15, 1, 18, 76, 105, 31, 1, 2, 88, 159, 46, 2, 13, 98, 191, 79, 4, 2, 114, 261, 105, 8, 14, 148, 282, 164, 19
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2022

Keywords

Comments

The partition run-sum trajectory is obtained by repeatedly taking the run-sums until a strict partition is reached. For example, the trajectory of y = (3,2,1,1,1) is (3,2,1,1,1) -> (3,3,2) -> (6,2), so y is counted under T(8,2).

Examples

			Triangle begins:
   1
   1
   2
   2  1
   4  1
   2  5
   5  5  1
   2 12  1
   8 11  3
   3 19  8
   5 27  9  1
   2 34 19  1
  15 26 34  2
   2 49 45  5
   5 68 48 14
   4 58 98 15  1
For example, row n = 8 counts the following partitions:
  (8)         (53)       (431)
  (44)        (62)       (521)
  (422)       (71)       (3221)
  (2222)      (332)
  (4211)      (611)
  (41111)     (3311)
  (221111)    (5111)
  (11111111)  (22211)
              (32111)
              (311111)
              (2111111)
		

Crossrefs

Row sums are A000041.
Row-lengths are A003056.
The last part of the same trajectory is A353842.
Column k = 1 is A353845, compositions A353858.
The length of the trajectory is A353846.
The version for compositions is A353856.
A275870 counts collapsible partitions, ranked by A300273.
A304442 counts partitions with constant run-sums, ranked by A353833/A353834.
A325268 counts partitions by omicron, rank statistic A304465.
A353837 counts partitions with all distinct run-sums, ranked by A353838.
A353840-A353846 pertain to partition run-sum trajectory.
A353847 represents the run-sums of a composition, partitions A353832.
A353864 counts rucksack partitions, ranked by A353866.
A353865 counts perfect rucksack partitions, ranked by A353867.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], Length[FixedPoint[Sort[Total/@Split[#]]&,#]]==k&]],{n,0,15},{k,0,n}]
Showing 1-4 of 4 results.