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

A353832 Heinz number of the multiset of run-sums of the prime indices of n.

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 5, 7, 10, 11, 9, 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, 25, 41, 42, 43, 33, 35, 46, 47, 21, 19, 26, 51, 39, 53, 26, 55, 35, 57, 58, 59, 45, 61, 62, 49, 13, 65, 66, 67, 51, 69, 70, 71, 35, 73, 74, 39, 57, 77, 78, 79, 35, 19
Offset: 1

Views

Author

Gus Wiseman, May 23 2022

Keywords

Comments

The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. 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 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.
This sequence represents the transformation f(P) described by Kimberling at A237685.

Examples

			The prime indices of 1260 are {1,1,2,2,3,4}, with run-sums (2,4,3,4), and the multiset {2,3,4,4} has Heinz number 735, so a(1260) = 735.
		

Crossrefs

The number of distinct prime factors of a(n) is A353835, weak A353861.
The version for compositions is A353847, listed A353932.
The greatest prime factor of a(n) has index A353862, least A353931.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A300273 ranks collapsible partitions, counted by A275870.
A353833 ranks partitions with all equal run-sums, counted by A304442.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353840-A353846 pertain to partition run-sum trajectory.
A353851 counts compositions w/ all equal run-sums, ranked by A353848.
A353864 counts rucksack partitions, ranked by A353866.
A353865 counts perfect rucksack partitions, ranked by A353867.
Cf. A005811, A047966, A071625, A073093, A181819, A182850, A182857, A304660, A323014, A353834, A353839, A353841 (1 + iterations needed to reach a squarefree number).

Programs

  • Mathematica
    Table[Times@@Prime/@Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>PrimePi[p]*k],{n,100}]
  • PARI
    pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
    A353832(n) = if(1==n,n,my(pruns = pis_to_runs(n), m=1, runsum=pruns[1]); for(i=2,#pruns,if(pruns[i] == pruns[i-1], runsum += pruns[i], m *= prime(runsum); runsum = pruns[i])); (m*prime(runsum))); \\ Antti Karttunen, Jan 20 2025

Formula

A001222(a(n)) = A001221(n).
A001221(a(n)) = A353835(n).
A061395(a(n)) = A353862(n).

Extensions

More terms from Antti Karttunen, Jan 20 2025

A353837 Number of integer partitions of n with all distinct run-sums.

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 10, 14, 17, 28, 35, 49, 62, 85, 107, 149, 174, 238, 305, 384, 476, 614, 752, 950, 1148, 1451, 1763, 2205, 2654, 3259, 3966, 4807, 5773, 7039, 8404, 10129, 12140, 14528, 17288, 20668, 24505, 29062, 34437, 40704, 48059, 56748, 66577, 78228
Offset: 0

Views

Author

Gus Wiseman, May 26 2022

Keywords

Comments

The run-sums of a sequence are the sums of its maximal consecutive constant subsequences (runs). For example, the run-sums of (2,2,1,1,1,3,2,2) are (4,3,3,4). The first partition whose run-sums are not all distinct is (2,1,1).

Examples

			The a(0) = 1 through a(6) = 10 partitions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (21)   (22)    (32)     (33)
                 (111)  (31)    (41)     (42)
                        (1111)  (221)    (51)
                                (311)    (222)
                                (2111)   (321)
                                (11111)  (411)
                                         (2211)
                                         (21111)
                                         (111111)
		

Crossrefs

For multiplicities instead of run-sums we have A098859, ranked by A130091.
For equal run-sums we have A304442, ranked by A353833 (nonprime A353834).
These partitions are ranked by A353838, complement A353839.
The version for compositions is A353850, ranked by A353852.
The weak version (rucksack partitions) is A353864, ranked by A353866.
The weak perfect version is A353865, ranked by A353867.
A005811 counts runs in binary expansion.
A275870 counts collapsible partitions, ranked by A300273.
A351014 counts distinct runs in standard compositions.
A353832 represents the operation of taking run-sums of a partition.
A353840-A353846 pertain to partition run-sum trajectory.
A353849 counts distinct run-sums in standard compositions.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Total/@Split[#]&]],{n,0,15}]
  • Sage
    a353837 = lambda n: sum( abs(BipartiteGraph( Matrix(len(p), len(D:=list(set.union(*map(lambda t: set(divisors(t)),p)))), lambda i,j: p[i]%D[j]==0) ).matching_polynomial()[len(D)-len(p)]) for p in Partitions(n,max_slope=-1) ) # Max Alekseyev, Sep 11 2023

A353847 Composition run-sum transformation in terms of standard composition numbers. The a(k)-th composition in standard order is the sequence of run-sums of the k-th composition in standard order. Takes each index of a row of A066099 to the index of the row consisting of its run-sums.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 30 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.

Examples

			As a triangle:
   0
   1
   2  2
   4  5  6  4
   8  9  8 10 12 13 10  8
  16 17 18 18 20 17 22 20 24 25 24 26 20 21 18 16
These are the standard composition numbers of the following compositions (transposed):
  ()  (1)  (2)  (3)    (4)      (5)
           (2)  (2,1)  (3,1)    (4,1)
                (1,2)  (4)      (3,2)
                (3)    (2,2)    (3,2)
                       (1,3)    (2,3)
                       (1,2,1)  (4,1)
                       (2,2)    (2,1,2)
                       (4)      (2,3)
                                (1,4)
                                (1,3,1)
                                (1,4)
                                (1,2,2)
                                (2,3)
                                (2,2,1)
                                (3,2)
                                (5)
		

Crossrefs

Standard compositions are listed by A066099.
The version for partitions is A353832.
The run-sums themselves are listed by A353932, with A353849 distinct terms.
A005811 counts runs in binary expansion.
A300273 ranks collapsible partitions, counted by A275870.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A353840-A353846 pertain to partition run-sum trajectory.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353860 counts collapsible compositions.
A353863 counts run-sum-complete partitions.

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[Total/@Split[stc[n]]],{n,0,100}]

A353833 Numbers whose multiset of prime indices has all equal run-sums.

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, 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 23 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. 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).

Examples

			The prime indices of 12 are {1,1,2}, with run-sums (2,2), so 12 is in the sequence.
		

Crossrefs

For parts instead of run-sums we have A000961, counted by A000005.
For run-lengths instead of run-sums we have A072774, counted by A047966.
These partitions are counted by A304442.
These are the positions of powers of primes in A353832.
The restriction to nonprimes is A353834.
For distinct instead of equal run-sums we have A353838, counted by A353837.
The version for compositions is A353848, counted by A353851.
A001222 counts prime factors, distinct A001221.
A005811 counts runs in binary expansion, distinct run-lengths A165413.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A300273 ranks collapsible partitions, counted by A275870.
A353835 counts distinct run-sums of prime indices, weak A353861.
A353840-A353846 deal with iterated run-sums for partitions.
A353862 gives greatest run-sum of prime indices, least A353931.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    Select[Range[100],SameQ@@Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]*k]&]

A353864 Number of rucksack partitions of n: every consecutive constant subsequence has a different sum.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 11, 14, 19, 25, 33, 39, 51, 65, 82, 101, 126, 154, 191, 232, 284, 343, 416, 496, 600, 716, 855, 1018, 1209, 1430, 1691, 1991, 2345, 2747, 3224, 3762, 4393, 5116, 5946, 6897, 7998, 9257, 10696, 12336, 14213, 16343, 18781, 21538, 24687, 28253, 32291, 36876, 42057
Offset: 0

Views

Author

Gus Wiseman, May 23 2022

Keywords

Comments

In a knapsack partition (A108917), every submultiset has a different sum, so these are run-knapsack partitions or rucksack partitions for short. Another variation of knapsack partitions is A325862.

Examples

			The a(0) = 1 through a(7) = 11 partitions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)       (7)
           (11)  (21)   (22)    (32)     (33)      (43)
                 (111)  (31)    (41)     (42)      (52)
                        (1111)  (221)    (51)      (61)
                                (311)    (222)     (322)
                                (11111)  (321)     (331)
                                         (411)     (421)
                                         (111111)  (511)
                                                   (2221)
                                                   (4111)
                                                   (1111111)
		

Crossrefs

Knapsack partitions are counted by A108917, ranked by A299702.
The strong case is A353838, counted by A353837, complement A353839.
The perfect case is A353865, ranked by A353867.
These partitions are ranked by A353866.
A000041 counts partitions, strict A000009.
A300273 ranks collapsible partitions, counted by A275870.
A304442 counts partitions with all equal run-sums, ranked by A353833.
A353832 represents the operation of taking run-sums of a partition.
A353836 counts partitions by number of distinct run-sums.
A353840-A353846 pertain to partition run-sum trajectory.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353863 counts partitions whose weak run-sums cover an initial interval.

Programs

  • Mathematica
    msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Total/@Select[msubs[#],SameQ@@#&]&]],{n,0,30}]

Extensions

a(50)-a(53) from Robert Price, Apr 03 2025

A353838 Numbers whose prime indices have all distinct run-sums.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71
Offset: 1

Views

Author

Gus Wiseman, May 23 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. 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).

Examples

			The prime indices of 180 are {1,1,2,2,3}, with run-sums (2,4,3), so 180 is in the sequence.
The prime indices of 315 are {2,2,3,4}, with run-sums (4,3,4), so 315 is not in the sequence.
		

Crossrefs

The version for all equal run-sums is A353833, counted by A304442.
These partitions are counted by A353837.
The complement is A353839.
The version for compositions is A353852, counted by A353850.
The greatest run-sum is given by A353862, least A353931.
The weak case is A353866, counted by A353864.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A098859 counts partitions with distinct multiplicities, ranked by A130091.
A165413 counts distinct run-sums in binary expansion.
A300273 ranks collapsible partitions, counted by A275870.
A351014 counts distinct runs in standard compositions.
A353832 represents taking run-sums of a partition, compositions A353847.
A353840-A353846 pertain to partition run-sum trajectory.

Programs

  • Mathematica
    Select[Range[100],UnsameQ@@Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]&]

A353848 Numbers k such that the k-th composition in standard order (row k of A066099) has all equal run-sums.

Original entry on oeis.org

0, 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, 143, 168, 170, 175, 187, 238, 248, 250, 255, 256, 292, 316, 487, 511, 512, 528, 543, 682, 750, 955, 1008, 1023, 1024, 2047, 2048, 2080, 2084, 2090, 2111, 2184
Offset: 0

Views

Author

Gus Wiseman, May 30 2022

Keywords

Comments

Every sequence can be uniquely split into non-overlapping runs, read left-to-right. 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.

Examples

			The terms together with their binary expansions and corresponding compositions begin:
     0:       0  ()
     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)
For example:
- The 59th composition in standard order is (1,1,2,1,1), with run-sums (2,2,2), so 59 is in the sequence.
- The 2298th composition in standard order is (4,1,1,1,1,2,2), with run-sums (4,4,4), so 2298 is in the sequence.
- The 2346th composition in standard order is (3,3,2,2,2), with run-sums (6,6), so 2346 is in the sequence.
		

Crossrefs

Standard compositions are listed by A066099.
For equal lengths instead of sums we have A353744, counted by A329738.
The version for partitions is A353833, counted by A304442.
These compositions are counted by A353851.
The distinct instead of equal version is A353852, counted by A353850.
The run-sums themselves are listed by A353932, with A353849 distinct terms.
A005811 counts runs in binary expansion.
A300273 ranks collapsible partitions, counted by A275870.
A351014 counts distinct runs in standard compositions, firsts A351015.
A353840-A353846 pertain to partition run-sum trajectory.
A353847 represents the run-sum transformation for compositions.
A353853-A353859 pertain to composition run-sum trajectory.
A353860 counts collapsible compositions.
A353863 counts run-sum-complete partitions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],SameQ@@Total/@Split[stc[#]]&]

Formula

A353849(a(n)) = 1.

A353932 Irregular triangle read by rows where row k lists the run-sums of the k-th composition in standard order.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 10 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.

Examples

			Triangle begins:
  1
  2
  2
  3
  2 1
  1 2
  3
  4
  3 1
  4
  2 2
  1 3
  1 2 1
For example, composition 350 in standard order is (2,2,1,1,1,2), so row 350 is (4,3,2).
		

Crossrefs

Row-sums are A029837.
Standard compositions are listed by A066099.
Row-lengths are A124767.
These compositions are ranked by A353847.
Row k has A353849(k) distinct parts.
The version for partitions is A354584, ranked by A353832.
A005811 counts runs in binary expansion.
A300273 ranks collapsible partitions, counted by A275870.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353851 counts compositions with all equal run-sums, ranked by A353848.
A353840-A353846 pertain to partition run-sum trajectory.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353853-A353859 pertain to composition run-sum trajectory.
A353860 counts collapsible compositions.

Programs

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

A353846 Triangle read by rows where T(n,k) is the number of integer partitions of n with partition run-sum trajectory of length k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 1, 0, 0, 2, 2, 1, 0, 0, 3, 4, 0, 0, 0, 0, 4, 6, 1, 0, 0, 0, 0, 5, 9, 1, 0, 0, 0, 0, 0, 6, 11, 4, 1, 0, 0, 0, 0, 0, 8, 20, 2, 0, 0, 0, 0, 0, 0, 0, 10, 25, 7, 0, 0, 0, 0, 0, 0, 0, 0, 12, 37, 6, 1, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, May 26 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 run-sums (or condensations) until a strict partition is reached. For example, the trajectory of (2,1,1) is (2,1,1) -> (2,2) -> (4).
Also the number of integer partitions of n with Kimberling's depth statistic (see A237685, A237750) equal to k-1.

Examples

			Triangle begins:
   1
   0   1
   0   1   1
   0   2   1   0
   0   2   2   1   0
   0   3   4   0   0   0
   0   4   6   1   0   0   0
   0   5   9   1   0   0   0   0
   0   6  11   4   1   0   0   0   0
   0   8  20   2   0   0   0   0   0   0
   0  10  25   7   0   0   0   0   0   0   0
   0  12  37   6   1   0   0   0   0   0   0   0
   0  15  47  13   2   0   0   0   0   0   0   0   0
   0  18  67  15   1   0   0   0   0   0   0   0   0   0
   0  22  85  25   3   0   0   0   0   0   0   0   0   0   0
   0  27 122  26   1   0   0   0   0   0   0   0   0   0   0   0
For example, row n = 8 counts the following partitions (empty columns indicated by dots):
.  (8)    (44)        (422)     (4211)  .  .  .  .
   (53)   (332)       (32111)
   (62)   (611)       (41111)
   (71)   (2222)      (221111)
   (431)  (3221)
   (521)  (3311)
          (5111)
          (22211)
          (311111)
          (2111111)
          (11111111)
		

Crossrefs

Row-sums are A000041.
Column k = 1 is A000009.
Column k = 2 is A237685.
Column k = 3 is A237750.
The version for run-lengths instead of run-sums is A225485 or A325280.
This statistic (trajectory length) is ranked by A353841 and A326371.
The version for compositions is A353859, see also A353847-A353858.
A005811 counts runs in binary expansion.
A275870 counts collapsible partitions, ranked by A300273.
A304442 counts partitions with all equal run-sums, ranked by A353833.
A353832 represents the operation of taking run-sums of a partition
A353836 counts partitions by number of distinct run-sums.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353840-A353846 pertain to partition run-sum trajectory.
A353845 counts partitions whose run-sum trajectory ends in a singleton.

Programs

  • Mathematica
    rsn[y_]:=If[y=={},{},NestWhileList[Reverse[Sort[Total/@ Split[Sort[#]]]]&,y,!UnsameQ@@#&]];
    Table[Length[Select[IntegerPartitions[n],Length[rsn[#]]==k&]],{n,0,15},{k,0,n}]

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}]
Showing 1-10 of 33 results. Next