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

A353854 Length of the trajectory of the composition run-sum transformation (condensation) of the n-th composition in standard order.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 3, 2, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 2, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 3, 1, 1, 3, 2, 1, 1, 1, 2, 2, 2, 2
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 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 corresponds to the trajectory (2,1,1) -> (2,2) -> (4), with length a(11) = 3.
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 trajectory of 94685 and the a(94685) = 5 corresponding compositions:
  94685: (2,1,1,4,1,1,2,1,1,2,1)
  86357: (2,2,4,2,2,2,2,1)
  69889: (4,4,8,1)
  65793: (8,8,1)
  65537: (16,1)
		

Crossrefs

Positions of first appearances are A072639.
Positions of 1's are A333489, counted by A003242 (complement A261983).
The version for partitions is A353841.
The last part of the same trajectory is A353855.
This is the rank statistic counted by A353859.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A333627 represents the run-lengths of standard compositions.
A353832 represents the run-sum transformation of a partition.
A353840-A353846 pertain to the partition run-sum trajectory.
A353847 represents the run-sum transformation of a composition.
A353853-A353859 pertain to the composition run-sum trajectory.
A353932 lists run-sums of standard compositions, represented by A353847.

Programs

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

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

A353842 Last part of the trajectory of the partition run-sum transformation of n, using Heinz numbers.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 5, 7, 10, 11, 7, 13, 14, 15, 7, 17, 14, 19, 15, 21, 22, 23, 15, 13, 26, 13, 21, 29, 30, 31, 11, 33, 34, 35, 21, 37, 38, 39, 13, 41, 42, 43, 33, 35, 46, 47, 21, 19, 26, 51, 39, 53, 26, 55, 35, 57, 58, 59, 35, 61, 62, 19, 13, 65, 66, 67, 51
Offset: 1

Views

Author

Gus Wiseman, May 25 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
The run-sum trajectory is obtained by repeatedly taking the run-sum transformation (A353832) until a squarefree number is reached. For example, the trajectory 12 -> 9 -> 7 corresponds to the partitions (2,1,1) -> (2,2) -> (4).

Examples

			The partition run-sum trajectory of 87780 is: 87780 -> 65835 -> 51205 -> 19855 -> 2915, so a(87780) = 2915.
		

Crossrefs

The fixed points and image are A005117.
For run-lengths instead of sums we have A304464/A304465, counted by A325268.
These are the row-ends of A353840.
Other sequences pertaining to partition trajectory are A353841-A353846.
The version for compositions is A353855, run-ends of A353853.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A182850 and A323014 give frequency depth.
A300273 ranks collapsible partitions, counted by A275870.
A353832 represents the operation of taking run-sums of a partition.
A353833 ranks partitions with all equal run-sums, counted by A304442.
A353835 counts distinct run-sums of prime indices, weak A353861.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    Table[NestWhile[Times@@Prime/@Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>PrimePi[p]*k]&,n,!SquareFreeQ[#]&],{n,100}]

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

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 0, 2, 2, 0, 0, 5, 2, 1, 0, 0, 2, 12, 2, 0, 0, 0, 8, 10, 12, 2, 0, 0, 0, 2, 32, 23, 6, 1, 0, 0, 0, 20, 26, 51, 28, 3, 0, 0, 0, 0, 5, 66, 109, 52, 22, 2, 0, 0, 0, 0, 8, 108, 144, 188, 53, 10, 1, 0, 0, 0, 0, 2, 134, 358, 282, 196, 48, 4, 0, 0, 0, 0
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 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,1,1,3,1,1,2,1,1,2,1) -> (2,2,3,2,2,2,2,1) -> (4,3,8,1) is counted under T(15,4).

Examples

			Triangle begins:
   1
   0   1
   0   2   0
   0   2   2   0
   0   5   2   1   0
   0   2  12   2   0   0
   0   8  10  12   2   0   0
   0   2  32  23   6   1   0   0
   0  20  26  51  28   3   0   0   0
   0   5  66 109  52  22   2   0   0   0
   0   8 108 144 188  53  10   1   0   0   0
   0   2 134 358 282 196  48   4   0   0   0   0
For example, row n = 6 counts the following compositions:
  .  (6)       (15)     (123)    (1212)  .  .
     (33)      (24)     (132)    (2121)
     (222)     (42)     (141)
     (1113)    (51)     (213)
     (2112)    (114)    (231)
     (3111)    (411)    (312)
     (11211)   (1122)   (321)
     (111111)  (2211)   (1131)
               (11112)  (1221)
               (21111)  (1311)
                        (11121)
                        (12111)
		

Crossrefs

Row sums are A011782.
Row-lengths without zeros appear to be A131737.
The version for partitions is A353843.
The length of the trajectory is A353854, firsts A072639, partitions A353841.
The last part of the same trajectory is A353855.
Column k = 1 is A353858.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A325268 counts partitions by omicron, rank statistic A304465.
A333489 ranks anti-runs, counted by A003242 (complement A261983).
A333627 ranks the run-lengths of standard compositions.
A353840-A353846 pertain to partition run-sum trajectory.
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
    Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n],Length[FixedPoint[Total/@Split[#]&,#]]==k&]],{n,0,15},{k,0,n}]

A353857 Numbers k such that the k-th composition in standard order has run-sum trajectory ending in a singleton.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 10, 11, 14, 15, 16, 31, 32, 36, 39, 42, 46, 59, 60, 63, 64, 127, 128, 136, 138, 139, 142, 143, 168, 170, 174, 175, 184, 186, 187, 232, 238, 239, 248, 250, 251, 255, 256, 292, 316, 487, 511, 512, 528, 543, 682, 750, 955, 1008, 1023, 1024, 2047
Offset: 1

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 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 corresponds to the trajectory (2,1,1) -> (2,2) -> (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.

Examples

			The terms together with their binary expansions and corresponding compositions begin:
   1:        1  (1)
   2:       10  (2)
   3:       11  (1,1)
   4:      100  (3)
   7:      111  (1,1,1)
   8:     1000  (4)
  10:     1010  (2,2)
  11:     1011  (2,1,1)
  14:     1110  (1,1,2)
  15:     1111  (1,1,1,1)
  16:    10000  (5)
  31:    11111  (1,1,1,1,1)
  32:   100000  (6)
  36:   100100  (3,3)
  39:   100111  (3,1,1,1)
  42:   101010  (2,2,2)
  46:   101110  (2,1,1,2)
  59:   111011  (1,1,2,1,1)
  60:   111100  (1,1,1,3)
  63:   111111  (1,1,1,1,1,1)
		

Crossrefs

The version for partitions is A353844.
The trajectory length is A353854, firsts A072639, for partitions A353841.
The last part of the trajectory is A353855, for partitions A353842.
These compositions are counted by A353858.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A066099 lists compositions in standard order.
A318928 gives runs-resistance of binary expansion.
A325268 counts partitions by omicron, rank statistic A304465.
A333627 ranks the run-lengths of standard compositions.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353840-A353846 pertain to partition run-sum trajectory.
A353847 represents composition run-sum transformation, partitions A353832.
A353853-A353859 pertain to composition run-sum trajectory.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[100],Length[FixedPoint[Total/@Split[#]&,stc[#]]]==1&]
Showing 1-7 of 7 results.