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

A353840 Trajectory of the partition run-sum transformation of n, using Heinz numbers.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 6, 7, 8, 5, 9, 7, 10, 11, 12, 9, 7, 13, 14, 15, 16, 7, 17, 18, 14, 19, 20, 15, 21, 22, 23, 24, 15, 25, 13, 26, 27, 13, 28, 21, 29, 30, 31, 32, 11, 33, 34, 35, 36, 21, 37, 38, 39, 40, 25, 13, 41, 42, 43, 44, 33, 45, 35, 46, 47, 48, 21, 49, 19
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 given in row 12 corresponds to the partitions (2,1,1) -> (2,2) -> (4).
This is the iteration of the transformation f described by Kimberling at A237685.

Examples

			Triangle begins:
   1
   2
   3
   4  3
   5
   6
   7
   8  5
   9  7
  10
  11
  12  9  7
Row 87780 is the following trajectory (left column), with prime indices shown on the right:
  87780: {1,1,2,3,4,5,8}
  65835: {2,2,3,4,5,8}
  51205: {3,4,4,5,8}
  19855: {3,5,8,8}
   2915: {3,5,16}
		

Crossrefs

The version for run-lengths instead of sums is A325239 or A325277.
This is the iteration of A353832, with composition version A353847.
Row-lengths are A353841, counted by A353846.
Final terms are A353842.
Counting rows by final omega gives A353843.
Rows ending in a prime number are A353844, counted by A353845.
These sequences for compositions are A353853-A353859.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A182850 or A323014 gives frequency depth.
A300273 ranks collapsible partitions, counted by A275870.
A353833 ranks partitions with all equal run-sums, counted by A304442.
A353835 counts distinct run-sums of prime indices, weak A353861.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353862 gives greatest run-sum of prime indices, least A353931.

Programs

  • Mathematica
    Table[NestWhileList[Times@@Prime/@Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]*k]&,n,Not@*SquareFreeQ],{n,30}]

A353841 Length of the trajectory of the partition run-sum transformation of n, using Heinz numbers; a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3
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.
Starting with n, this is one plus the number of times one must apply A353832 to reach a squarefree number.
Also Kimberling's depth statistic (defined in A237685 and A237750) plus one.

Examples

			The trajectory for a(1080) = 4 is the following, with prime indices shown on the right:
  1080: {1,1,1,2,2,2,3}
   325: {3,3,6}
   169: {6,6}
    37: {12}
The trajectory for a(87780) = 5 is the following, with prime indices shown on the right:
  87780: {1,1,2,3,4,5,8}
  65835: {2,2,3,4,5,8}
  51205: {3,4,4,5,8}
  19855: {3,5,8,8}
   2915: {3,5,16}
The trajectory for a(39960) = 5 is the following, with prime indices shown on the right:
  39960: {1,1,1,2,2,2,3,12}
  12025: {3,3,6,12}
   6253: {6,6,12}
   1369: {12,12}
     89: {24}
		

Crossrefs

Positions of 1's are A005117.
The version for run-lengths instead of sums is A182850 or A323014.
Positions of first appearances are A353743.
These are the row-lengths of A353840.
Other sequences pertaining to this trajectory are A353842-A353845.
Counting partitions by this statistic gives A353846.
The version for compositions is A353854, run-lengths of A353853.
A001222 counts prime factors, distinct A001221.
A005811 counts runs in binary expansion.
A056239 adds up prime indices, row sums of A112798 and A296150.
A300273 ranks collapsible partitions, counted by A275870.
A318928 gives runs-resistance of binary expansion.
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.
A353838 ranks partitions with all distinct run-sums, counted by A353837.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    Table[If[n==1,0,Length[NestWhileList[Times@@Prime/@Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>PrimePi[p]*k]&,n,!SquareFreeQ[#]&]]],{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)));
    A353841(n) = if(1==n,0,for(i=1,oo,if(issquarefree(n), return(i), n = A353832(n)))); \\ Antti Karttunen, Jan 20 2025

Formula

a(1) = 0, and for n > 1, if A008966(n) = 1 [n is in A005117], a(n) = 1, otherwise a(n) = 1+a(A353832(n)). [See comments] - Antti Karttunen, Jan 20 2025

Extensions

More terms from Antti Karttunen, Jan 20 2025

A353855 Last term of the trajectory of the composition run-sum transformation (condensation) of the n-th composition in standard order.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 6, 4, 8, 9, 8, 8, 12, 13, 8, 8, 16, 17, 18, 18, 20, 17, 22, 20, 24, 25, 24, 24, 20, 17, 18, 16, 32, 33, 34, 34, 32, 37, 38, 32, 40, 41, 32, 34, 44, 45, 32, 40, 48, 49, 50, 50, 52, 49, 54, 52, 40, 41, 40, 32, 32, 37, 34, 32, 64, 65, 66, 66, 68
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, corresponding to (2,1,1) -> (2,2) -> (4), has last term a(11) = 8.
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 139 -> 138 -> 136 -> 128 ends with a(139) = 128.
		

Crossrefs

The version for partitions is A353842.
This trajectory has length A353854, firsts A072639, partitions A353841.
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 a partition's run-sum trajectory.
A353847 represents a composition's run-sums, partitions A353832.
A353853-A353859 pertain to a composition's run-sum trajectory.

Programs

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

A353930 Smallest number whose binary expansion has n distinct run-sums.

Original entry on oeis.org

1, 2, 11, 183, 5871, 375775, 48099263, 12313411455, 6304466665215, 6455773865180671, 13221424875890015231, 54154956291645502388223, 443637401941159955564326911, 7268555193403964711965932118015, 238176016577461115681699663643131903, 15609103422420491677315869156516292427775
Offset: 1

Views

Author

Gus Wiseman, Jun 07 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 terms, binary expansions, and standard compositions begin:
       1:                    1  (1)
       2:                   10  (2)
      11:                 1011  (2,1,1)
     183:             10110111  (2,1,2,1,1,1)
    5871:        1011011101111  (2,1,2,1,1,2,1,1,1,1)
  375775:  1011011101111011111  (2,1,2,1,1,2,1,1,1,2,1,1,1,1,1)
		

Crossrefs

Essentially the same as A215203.
For prime indices instead of binary expansion we have A006939.
For lengths instead of sums of runs we have A165933 = firsts in A165413.
Numbers whose binary expansion has all distinct runs are A175413.
For standard compositions we have A246534, firsts of A353849.
For runs instead of run-sums we have A350952, firsts of A297770.
These are the positions of first appearances in A353929.
A005811 counts runs in binary expansion.
A242882 counts compositions with distinct multiplicities.
A318928 gives runs-resistance of binary expansion.
A351014 counts distinct runs in standard compositions.
A353835 counts partitions with all distinct run-sums, weak A353861.
A353864 counts rucksack partitions.

Programs

  • Mathematica
    qe=Table[Length[Union[Total/@Split[IntegerDigits[n,2]]]],{n,1,10000}];
    Table[Position[qe,i][[1,1]],{i,Max@@qe}]
  • PARI
    a(n) = {my(t=1); if(n==2, t<<=1, for(k=3, n, t = (t<Andrew Howroyd, Jan 01 2023

Extensions

Offset corrected and terms a(7) and beyond from Andrew Howroyd, Jan 01 2023

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

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