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.

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

A237685 Number of partitions of n having depth 1; see Comments.

Original entry on oeis.org

0, 1, 1, 2, 4, 6, 9, 11, 20, 25, 37, 47, 67, 85, 122, 142, 200, 259, 330, 412, 538, 663, 846, 1026, 1309, 1598, 2013, 2432, 3003, 3670, 4467, 5383, 6591, 7892, 9544, 11472, 13768, 16424, 19686, 23392, 27802, 33011, 39094, 46243, 54700, 64273, 75638, 88765
Offset: 1

Views

Author

Clark Kimberling, Feb 19 2014

Keywords

Comments

Suppose that P is a partition of n. Let x(1), x(2),...,x(k) be the distinct parts of P, and let m(i) be the multiplicity of x(i) in P. Let f(P) be the partition [m(1)*x(1), m(2)*x(2),...,x(k)*m(k)] of n. Define c(0,P) = P, c(1,P) = f(P), ..., c(n,P) = f(c(n-1,P)), and define d(P) = least n such that c(n,P) has no repeated parts; d(P) is introduced here as the depth of P. Clearly d(P) = 0 if and only if P is a strict partition, as in A000009. Conjecture: if d >= 0, then 2^d is the least n that has a partition of depth d.

Examples

			The 11 partitions of 6 are partitioned by depth as follows:
  depth 0: 6, 51, 42, 321;
  depth 1: 411, 33, 222, 2211, 21111, 11111;
  depth 2: 3111.
Thus, a(6) = 6, A000009(6) = 4, A237750(6) = 1, A237978(6) = 0.
		

Crossrefs

Programs

  • Mathematica
    z = 60; c[n_] := c[n] = Map[Length[FixedPointList[Sort[Map[Total, Split[#]], Greater] &, #]] - 2 &, IntegerPartitions[n]]
    Table[Count[c[n], 1], {n, 1, z}] (* this sequence *)
    Table[Count[c[n], 2], {n, 1, z}] (* A237750 *)
    Table[Count[c[n], 3], {n, 1, z}] (* A237978 *)
    (* Peter J. C. Moses, Feb 19 2014 *)

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

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[#]&]]&]

A237978 Number of partitions of n having depth 3; see Comments.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 1, 3, 1, 10, 6, 6, 13, 15, 20, 30, 30, 64, 61, 85, 99, 153, 170, 184, 271, 359, 416, 539, 631, 799, 971, 1199, 1433, 1803, 2153, 2692, 3173, 3882, 4544, 5610, 6663, 8090, 9565, 11467, 13590, 16305, 19184, 22933, 26973
Offset: 1

Views

Author

Clark Kimberling, Feb 19 2014

Keywords

Comments

Suppose that P is a partition of n. Let x(1), x(2),...,x(k) be the distinct parts of P, and let m(i) be the multiplicity of x(i) in P. Let f(P) be the partition [m(1)*x(1), m(2)*x(2),...,x(k)*m(k)] of n. Define c(0,P) = P, c(1,P) = f(P),..., c(n,P) = f(c(n-1,P)), and define d(P) = least n such that c(n,P) has no repeated parts; d(P) is introduced here as the depth of P. Clearly d(P) = 0 if and only if P is a strict partition, as in A000009. Conjecture: if d >= 0, then 2^d is the least n that has a partition of depth d.

Examples

			a(14) = 3 counts these partitions: 64211, 632111, 433211.
Successive applications of f to the first of these partitions are indicated by 64211 -> 6422 -> 644 -> 86.
		

Crossrefs

Programs

  • Mathematica
    z = 60; c[n_] := c[n] = Map[Length[FixedPointList[Sort[Map[Total, Split[#]], Greater] &, #]] - 2 &, IntegerPartitions[n]]
    Table[Count[c[n], 1], {n, 1, z}] (* A237685 *)
    Table[Count[c[n], 2], {n, 1, z}] (* A237750 *)
    Table[Count[c[n], 3], {n, 1, z}] (* this sequence *)
    (* Peter J. C. Moses, Feb 19 2014 *)

A366063 Irregular triangle read by rows: T(n,k) is the number of partitions of n that have depth k.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 1, 3, 4, 0, 4, 6, 1, 5, 9, 1, 6, 11, 4, 1, 8, 20, 2, 0, 10, 25, 7, 0, 12, 37, 6, 1, 15, 47, 13, 2, 18, 67, 15, 1, 22, 85, 25, 3, 27, 122, 26, 1, 32, 142, 46, 10, 1, 38, 200, 53, 6, 0, 46, 259, 74, 6, 0, 54, 330, 92, 13, 1, 64, 412, 136
Offset: 1

Views

Author

Clark Kimberling, Sep 28 2023

Keywords

Comments

Suppose that P is a partition of n. Let x(1), x(2),...,x(k) be the distinct parts of P, and let m(i) be the multiplicity of x(i) in P. Let f(P) be the partition [m(1)*x(1), m(2)*x(2),...,x(k)*m(k)] of n. Define c(0,P) = P, c(1,P) = f(P), ..., c(n,P) = f(c(n-1,P)), and define d(P) = least n such that c(n,P) has no repeated parts; d(P) is as the depth of P, as defined in A237685. Clearly d(P) = 0 if and only if P is a strict partition, as in A000009. Conjecture: if d >= 0, then 2^d is the least n that has a partition of depth d.

Examples

			First 20 rows:
   1
   1      1
   2      1
   2      2     1
   3      4     0
   4      6     1
   5      9     1
   6     11     4    1
   8     20     2    0
  10     25     7    0
  12     37     6    1
  15     47    13    2
  18     67    15    1
  22     85    25    3
  27    122    26    1
  32    142    46   10    1
  38    200    53    6    0
  46    259    74    6    0
  54    330    92   13    1
  64    412   136   15    0
		

Crossrefs

Cf. A000009, A000041, A237685 (column 1), A237750 (column 2), A237978 (column 3), A225485 (frequency depth array).

Programs

  • Mathematica
    z = 36; c[n_] := c[n] = Map[Length[FixedPointList[Sort[Map[Total, Split[#]], Greater] &, #]] - 2 &, IntegerPartitions[n]]
    t = Table[Count[c[n], k], {n, 1, z}, {k, 0, Floor[Log[2, n]]}]
    TableForm[t] (* this sequence as an array *)
    Flatten[t]   (* this sequence *)
Showing 1-6 of 6 results.