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

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

A353844 Starting with the multiset of prime indices of n, repeatedly take the multiset of run-sums until you reach a squarefree number. This number is prime (or 1) iff n belongs to the sequence.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 40, 41, 43, 47, 49, 53, 59, 61, 63, 64, 67, 71, 73, 79, 81, 83, 84, 89, 97, 101, 103, 107, 109, 112, 113, 121, 125, 127, 128, 131, 137, 139, 144, 149, 151, 157, 163, 167, 169, 173, 179
Offset: 1

Views

Author

Gus Wiseman, May 26 2022

Keywords

Comments

The run-sums transformation is described by Kimberling at A237685 and A237750.
The runs of a sequence are its maximal consecutive constant subsequences. For example, the runs of {1,1,1,2,2,3,4} are {1,1,1}, {2,2}, {3}, {4}, with sums {3,3,4,4}.
Note that the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so this sequence lists Heinz numbers of partitions whose run-sum trajectory reaches an empty set or singleton.

Examples

			The terms together with their prime indices begin:
      1: {}            25: {3,3}           64: {1,1,1,1,1,1}
      2: {1}           27: {2,2,2}         67: {19}
      3: {2}           29: {10}            71: {20}
      4: {1,1}         31: {11}            73: {21}
      5: {3}           32: {1,1,1,1,1}     79: {22}
      7: {4}           37: {12}            81: {2,2,2,2}
      8: {1,1,1}       40: {1,1,1,3}       83: {23}
      9: {2,2}         41: {13}            84: {1,1,2,4}
     11: {5}           43: {14}            89: {24}
     12: {1,1,2}       47: {15}            97: {25}
     13: {6}           49: {4,4}          101: {26}
     16: {1,1,1,1}     53: {16}           103: {27}
     17: {7}           59: {17}           107: {28}
     19: {8}           61: {18}           109: {29}
     23: {9}           63: {2,2,4}        112: {1,1,1,1,4}
The trajectory 60 -> 45 -> 35 ends in a nonprime number 35, so 60 is not in the sequence.
The trajectory 84 -> 63 -> 49 -> 19 ends in a prime number 19, so 84 is in the sequence.
		

Crossrefs

This sequence is a subset of A300273, counted by A275870.
The version for compositions is A353857, counted by A353847.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A304442 counts partitions with all equal run-sums.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A325268 counts partitions by omicron, rank statistic A304465.
A353832 represents the operation of taking run-sums of a partition.
A353833 ranks partitions with all equal run-sums, nonprime A353834.
A353835 counts distinct run-sums of prime indices, weak A353861.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353840-A353846 pertain to partition run-sum trajectory.
A353853-A353859 pertain to composition run-sum trajectory.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    ope[n_]:=Times@@Prime/@Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>PrimePi[p]*k];
    Select[Range[100],#==1||PrimeQ[NestWhile[ope,#,!SquareFreeQ[#]&]]&]
Showing 1-3 of 3 results.