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

A304442 Number of partitions of n in which the sequence of the sum of the same summands is constant.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 5, 2, 7, 3, 5, 2, 13, 2, 5, 4, 11, 2, 13, 2, 12, 4, 5, 2, 28, 3, 5, 5, 12, 2, 18, 2, 17, 4, 5, 4, 44, 2, 5, 4, 24, 2, 18, 2, 12, 10, 5, 2, 63, 3, 9, 4, 12, 2, 34, 4, 24, 4, 5, 2, 67, 2, 5, 10, 27, 4, 18, 2, 12, 4, 14, 2, 120, 2, 5, 7, 12, 4, 18, 2, 54
Offset: 0

Views

Author

Seiichi Manyama, May 12 2018

Keywords

Comments

Said differently, these are partitions whose run-sums are all equal. - Gus Wiseman, Jun 25 2022

Examples

			a(72) = binomial(d(72),1) + binomial(d(36),2) + binomial(d(24),3) + binomial(d(18),4) + binomial(d(12),6) = 12 + 36 + 56 + 15 + 1 = 120, where d(n) is the number of divisors of n.
--+----------------------+-----------------------------------------
n |                      | Sequence of the sum of the same summands
--+----------------------+-----------------------------------------
1 | 1                    | 1
2 | 2                    | 2
  | 1+1                  | 2
3 | 3                    | 3
  | 1+1+1                | 3
4 | 4                    | 4
  | 2+2                  | 4
  | 2+1+1                | 2, 2
  | 1+1+1+1              | 4
5 | 5                    | 5
  | 1+1+1+1+1            | 5
6 | 6                    | 6
  | 3+3                  | 6
  | 3+1+1+1              | 3, 3
  | 2+2+2                | 6
  | 1+1+1+1+1+1          | 6
		

Crossrefs

All parts are divisors of n, see A018818, compositions A100346.
For run-lengths instead of run-sums we have A047966, compositions A329738.
These partitions are ranked by A353833.
The distinct instead of equal version is A353837, ranked by A353838, compositions A353850.
The version for compositions is A353851, ranked by A353848.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],SameQ@@Total/@Split[#]&]],{n,0,15}] (* Gus Wiseman, Jun 25 2022 *)
  • PARI
    a(n) = if (n==0, 1, sumdiv(n, d, binomial(numdiv(n/d), d))); \\ Michel Marcus, May 13 2018

Formula

a(n) >= 2 for n > 1.
a(n) = Sum_{d|n} binomial(A000005(n/d), d) for n > 0.

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

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.

A353851 Number of integer compositions of n with all equal run-sums.

Original entry on oeis.org

1, 1, 2, 2, 5, 2, 8, 2, 12, 5, 8, 2, 34, 2, 8, 8, 43, 2, 52, 2, 70, 8, 8, 2, 282, 5, 8, 18, 214, 2, 386, 2, 520, 8, 8, 8, 1957, 2, 8, 8, 2010, 2, 2978, 2, 3094, 94, 8, 2, 16764, 5, 340, 8, 12310, 2, 26514, 8, 27642, 8, 8, 2, 132938, 2, 8, 238, 107411, 8, 236258
Offset: 0

Views

Author

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

Examples

			The a(0) = 1 through a(8) = 12 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
           (11)  (111)  (22)    (11111)  (33)      (1111111)  (44)
                        (112)            (222)                (224)
                        (211)            (1113)               (422)
                        (1111)           (2112)               (2222)
                                         (3111)               (11114)
                                         (11211)              (41111)
                                         (111111)             (111122)
                                                              (112112)
                                                              (211211)
                                                              (221111)
                                                              (11111111)
For example:
  (1,1,2,1,1) has run-sums (2,2,2) so is counted under a(6).
  (4,1,1,1,1,2,2) has run-sums (4,4,4) so is counted under a(12).
  (3,3,2,2,2) has run-sums (6,6) so is counted under a(12).
		

Crossrefs

The version for parts or runs instead of run-sums is A000005.
The version for multiplicities instead of run-sums is A098504.
All parts are divisors of n, see A100346.
The version for partitions is A304442, ranked by A353833.
The version for run-lengths instead of run-sums is A329738, ptns A047966.
These compositions are ranked by A353848.
The distinct instead of equal version is A353850.
A003242 counts anti-run compositions, ranked by A333489.
A005811 counts runs in binary expansion.
A011782 counts compositions.
A353847 represents the composition run-sum transformation.
For distinct instead of equal run-sums: A032020, A098859, A242882, A329739, A351013, A353837, ranked by A353838 (complement A353839), A353852, A354580, ranked by A354581.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@ IntegerPartitions[n],SameQ@@Total/@Split[#]&]],{n,0,15}]
  • PARI
    a(n) = {if(n <=1, return(1)); my(d = divisors(n), res = 0); for(i = 1, #d, nd = numdiv(d[i]); res+=(nd*(nd-1)^(n/d[i]-1)) ); res } \\ David A. Corneth, Jun 02 2022

Formula

From David A. Corneth, Jun 02 2022 (Start)
a(p) = 2 for prime p.
a(p*q) = 8 for distinct primes p and q (Cf. A006881).
a(n) = Sum_{d|n} tau(d)*(tau(d)-1) ^ (n/d - 1) where tau = A000005. (End)

Extensions

More terms from David A. Corneth, Jun 02 2022

A317081 Number of integer partitions of n whose multiplicities cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 5, 9, 11, 16, 20, 30, 34, 50, 58, 79, 96, 129, 152, 203, 243, 307, 375, 474, 563, 707, 850, 1042, 1246, 1532, 1815, 2215, 2632, 3173, 3765, 4525, 5323, 6375, 7519, 8916, 10478, 12414, 14523, 17133, 20034, 23488, 27422, 32090, 37285, 43511, 50559
Offset: 0

Views

Author

Gus Wiseman, Jul 21 2018

Keywords

Comments

Also the number of integer partitions of n with distinct section-sums, where the k-th part of the section-sum partition is the sum of all (distinct) parts that appear at least k times. - Gus Wiseman, Apr 21 2025

Examples

			The a(1) = 1 through a(9) = 16 partitions:
 (1) (2) (3)  (4)   (5)   (6)   (7)    (8)    (9)
         (21) (31)  (32)  (42)  (43)   (53)   (54)
              (211) (41)  (51)  (52)   (62)   (63)
                    (221) (321) (61)   (71)   (72)
                    (311) (411) (322)  (332)  (81)
                                (331)  (422)  (432)
                                (421)  (431)  (441)
                                (511)  (521)  (522)
                                (3211) (611)  (531)
                                       (3221) (621)
                                       (4211) (711)
                                              (3321)
                                              (4221)
                                              (4311)
                                              (5211)
                                              (32211)
		

Crossrefs

The case with parts also covering an initial interval is A317088.
These partitions are ranked by A317090.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A047966 counts partitions with constant section-sums.
A048767 interchanges prime indices and prime multiplicities (Look-and-Say), see A048768.
A055932 lists numbers whose prime indices cover an initial interval.
A116540 counts normal set multipartitions.
A304442 counts partitions with equal run-sums, ranks A353833.
A381436 lists the section-sum partition of prime indices.
A381440 lists the Look-and-Say partition of prime indices.

Programs

  • Mathematica
    normalQ[m_]:=Union[m]==Range[Max[m]];
    Table[Length[Select[IntegerPartitions[n],normalQ[Length/@Split[#]]&]],{n,30}]
  • Python
    from sympy.utilities.iterables import partitions
    def A317081(n):
        if n == 0:
            return 1
        c = 0
        for d in partitions(n):
            s = set(d.values())
            if len(s) == max(s):
                c += 1
        return c # Chai Wah Wu, Jun 22 2020

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