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

A351294 Numbers whose multiset of prime factors has at least one permutation with all distinct run-lengths.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 31, 32, 37, 40, 41, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 61, 63, 64, 67, 68, 71, 72, 73, 75, 76, 79, 80, 81, 83, 88, 89, 92, 96, 97, 98, 99, 101, 103, 104, 107, 108, 109
Offset: 1

Views

Author

Gus Wiseman, Feb 15 2022

Keywords

Comments

First differs from A130091 (Wilf partitions) in having 216.
See A239455 for the definition of Look-and-Say partitions.
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.

Examples

			The terms together with their prime indices begin:
      1: ()            20: (3,1,1)         47: (15)
      2: (1)           23: (9)             48: (2,1,1,1,1)
      3: (2)           24: (2,1,1,1)       49: (4,4)
      4: (1,1)         25: (3,3)           50: (3,3,1)
      5: (3)           27: (2,2,2)         52: (6,1,1)
      7: (4)           28: (4,1,1)         53: (16)
      8: (1,1,1)       29: (10)            54: (2,2,2,1)
      9: (2,2)         31: (11)            56: (4,1,1,1)
     11: (5)           32: (1,1,1,1,1)     59: (17)
     12: (2,1,1)       37: (12)            61: (18)
     13: (6)           40: (3,1,1,1)       63: (4,2,2)
     16: (1,1,1,1)     41: (13)            64: (1,1,1,1,1,1)
     17: (7)           43: (14)            67: (19)
     18: (2,2,1)       44: (5,1,1)         68: (7,1,1)
     19: (8)           45: (3,2,2)         71: (20)
For example, the prime indices of 216 are {1,1,1,2,2,2}, and there are four permutations with distinct run-lengths: (1,1,2,2,2,1), (1,2,2,2,1,1), (2,1,1,1,2,2), (2,2,1,1,1,2); so 216 is in the sequence. It is the Heinz number of the Look-and-Say partition of (3,3,2,1).
		

Crossrefs

The Wilf case (distinct multiplicities) is A130091, counted by A098859.
The complement of the Wilf case is A130092, counted by A336866.
These partitions appear to be counted by A239455.
A variant for runs is A351201, counted by A351203 (complement A351204).
The complement is A351295, counted by A351293.
A032020 = number of binary expansions with distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A056239 = sum of prime indices, row sums of A112798.
A165413 = number of run-lengths in binary expansion, for all runs A297770.
A181819 = Heinz number of prime signature (prime shadow).
A182850/A323014 = frequency depth, counted by A225485/A325280.
A320922 ranks graphical partitions, complement A339618, counted by A000569.
A329739 = compositions with all distinct run-lengths, for all runs A351013.
A333489 ranks anti-runs, complement A348612.
A351017 = binary words with all distinct run-lengths, for all runs A351016.
A351292 = patterns with all distinct run-lengths, for all runs A351200.

Programs

  • Mathematica
    Select[Range[100],Select[Permutations[Join@@ ConstantArray@@@FactorInteger[#]],UnsameQ@@Length/@Split[#]&]!={}&]

Extensions

Name edited by Gus Wiseman, Aug 13 2025

A351295 Numbers whose multiset of prime factors has no permutation with all distinct run-lengths.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 30, 33, 34, 35, 36, 38, 39, 42, 46, 51, 55, 57, 58, 60, 62, 65, 66, 69, 70, 74, 77, 78, 82, 84, 85, 86, 87, 90, 91, 93, 94, 95, 100, 102, 105, 106, 110, 111, 114, 115, 118, 119, 120, 122, 123, 126, 129, 130, 132, 133, 134, 138, 140
Offset: 1

Views

Author

Gus Wiseman, Feb 16 2022

Keywords

Comments

First differs from A130092 (non-Wilf partitions) in lacking 216.
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.

Examples

			The terms together with their prime indices begin:
      6: (2,1)         46: (9,1)         84: (4,2,1,1)
     10: (3,1)         51: (7,2)         85: (7,3)
     14: (4,1)         55: (5,3)         86: (14,1)
     15: (3,2)         57: (8,2)         87: (10,2)
     21: (4,2)         58: (10,1)        90: (3,2,2,1)
     22: (5,1)         60: (3,2,1,1)     91: (6,4)
     26: (6,1)         62: (11,1)        93: (11,2)
     30: (3,2,1)       65: (6,3)         94: (15,1)
     33: (5,2)         66: (5,2,1)       95: (8,3)
     34: (7,1)         69: (9,2)        100: (3,3,1,1)
     35: (4,3)         70: (4,3,1)      102: (7,2,1)
     36: (2,2,1,1)     74: (12,1)       105: (4,3,2)
     38: (8,1)         77: (5,4)        106: (16,1)
     39: (6,2)         78: (6,2,1)      110: (5,3,1)
     42: (4,2,1)       82: (13,1)       111: (12,2)
For example, the prime indices of 150 are {1,2,3,3}, with permutations and run-lengths (right):
  (3,3,2,1) -> (2,1,1)
  (3,3,1,2) -> (2,1,1)
  (3,2,3,1) -> (1,1,1,1)
  (3,2,1,3) -> (1,1,1,1)
  (3,1,3,2) -> (1,1,1,1)
  (3,1,2,3) -> (1,1,1,1)
  (2,3,3,1) -> (1,2,1)
  (2,3,1,3) -> (1,1,1,1)
  (2,1,3,3) -> (1,1,2)
  (1,3,3,2) -> (1,2,1)
  (1,3,2,3) -> (1,1,1,1)
  (1,2,3,3) -> (1,1,2)
Since none have all distinct run-lengths, 150 is in the sequence.
		

Crossrefs

Wilf partitions are counted by A098859, ranked by A130091.
Non-Wilf partitions are counted by A336866, ranked by A130092.
A variant for runs is A351201, counted by A351203 (complement A351204).
These partitions appear to be counted by A351293.
The complement is A351294, apparently counted by A239455.
A032020 = number of binary expansions with distinct run-lengths.
A044813 = numbers whose binary expansion has all distinct run-lengths.
A056239 = sum of prime indices, row sums of A112798.
A165413 = number of distinct run-lengths in binary expansion.
A181819 = Heinz number of prime signature (prime shadow).
A182850/A323014 = frequency depth, counted by A225485/A325280.
A297770 = number of distinct runs in binary expansion.
A320922 ranks graphical partitions, complement A339618, counted by A000569.
A329739 = compositions with all distinct run-lengths, for all runs A351013.
A329747 = runs-resistance, counted by A329746.
A333489 ranks anti-runs, complement A348612.
A351017 = binary words with all distinct run-lengths, for all runs A351016.

Programs

  • Mathematica
    Select[Range[100],Select[Permutations[Join@@ ConstantArray@@@FactorInteger[#]],UnsameQ@@Length/@Split[#]&]=={}&]

Extensions

Name edited by Gus Wiseman, Aug 13 2025

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

A336866 Number of integer partitions of n without all distinct multiplicities.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 9, 15, 21, 28, 46, 56, 80, 114, 149, 192, 269, 337, 455, 584, 751, 943, 1234, 1527, 1944, 2422, 3042, 3739, 4699, 5722, 7100, 8668, 10634, 12880, 15790, 19012, 23093, 27776, 33528, 40102, 48264, 57469, 68793, 81727, 97372, 115227
Offset: 0

Views

Author

Gus Wiseman, Aug 09 2020

Keywords

Examples

			The a(0) = 0 through a(9) = 15 partitions (empty columns shown as dots):
  .  .  .  (21)  (31)  (32)  (42)    (43)    (53)     (54)
                       (41)  (51)    (52)    (62)     (63)
                             (321)   (61)    (71)     (72)
                             (2211)  (421)   (431)    (81)
                                     (3211)  (521)    (432)
                                             (3221)   (531)
                                             (3311)   (621)
                                             (4211)   (3321)
                                             (32111)  (4221)
                                                      (4311)
                                                      (5211)
                                                      (32211)
                                                      (42111)
                                                      (222111)
                                                      (321111)
		

Crossrefs

A098859 counts the complement.
A130092 gives the Heinz numbers of these partitions.
A001222 counts prime factors with multiplicity.
A013929 lists nonsquarefree numbers.
A047966 counts uniform partitions.
A047967 counts non-strict partitions.
A071625 counts distinct prime multiplicities.
A130091 lists numbers with distinct prime multiplicities.
A181796 counts divisors with distinct prime multiplicities.
A327498 gives the maximum divisor with distinct prime multiplicities.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],!UnsameQ@@Length/@Split[#]&]],{n,0,30}]

Formula

a(n) = A000041(n) - A098859(n).

A225485 Number of partitions of n that have frequency depth k, an array read by rows.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 3, 4, 3, 1, 1, 4, 8, 1, 1, 3, 6, 9, 3, 1, 2, 8, 12, 7, 1, 3, 11, 17, 10, 1, 1, 11, 26, 17, 1, 5, 19, 25, 27, 1, 1, 17, 44, 38, 1, 3, 25, 53, 52, 1, 1, 3, 29, 63, 76, 4
Offset: 1

Views

Author

Clark Kimberling, May 08 2013

Keywords

Comments

Let S = {x(1),...,x(k)} be a multiset whose distinct elements are y(1),...,y(h). Let f(i) be the frequency of y(i) in S. Define F(S) = {f(1),..,f(h)}, F(1,S) = F(S), and F(m,S) = F(F(m-1),S) for m>1. Then lim(F(m,S)) = {1} for every S, so that there is a least positive integer i for which F(i,S) = {1}, which we call the frequency depth of S.
Equivalently, the frequency depth of an integer partition is the number of times one must take the multiset of multiplicities to reach (1). For example, the partition (32211) has frequency depth 5 because we have: (32211) -> (221) -> (21) -> (11) -> (2) -> (1). - Gus Wiseman, Apr 19 2019
From Clark Kimberling, Sep 26 2023: (Start)
Below, m^n abbreviates the sum m+...+m of n terms. In the following list, the numbers p_1,...,p_k are distinct, m >= 1, and k >= 1. The forms of the partitions being counted are as follows:
column 1: [n],
column 2: [m^k],
column 3: [p_1^m,...,p_k^m],
column 4: [(p_1^m_1)^m,..., (p_k^m_k)^m], distinct numbers m_i.
Column 3 is of special interest. Assume first that m = 1, so that the form of partition being counted is p = [p_1,...,p_k], with conjugate given by [q_1,...,q_m] where q_i is the number of parts of p that are >= i. Since the p_i are distinct, the distinct parts of q are the integers 1,2,...,k. For the general case that m >= 1, the distinct parts of q are the integers m,...,km. Let S(n) denote the set of partitions of n counted by column 3. Then if a and b are in the set S*(n) of conjugates of partitions in S(n), and if a > b, then a - b is also in S*(n). Call this the subtraction property. Conversely, if a partition q has the subtraction property, then q must consist of a set of numbers m,..,km for some m. Thus, column 3 counts the partitions of n that have the subtraction property. (End)

Examples

			The first 9 rows:
  n = 1 .... 0
  n = 2 .... 1..1
  n = 3 .... 1..1..1
  n = 4 .... 1..2..1..1
  n = 5 .... 1..1..2..3
  n = 6 .... 1..3..4..3
  n = 7 .... 1..1..4..8..1
  n = 8 .... 1..3..6..9..3
  n = 9 .... 1..2..8.12..7
For the 7 partitions of 5, successive frequencies are shown here:
  5 -> 1 (depth 1)
  41 -> 11 -> 2 -> 1 (depth 3)
  32 -> 11 -> 2 -> 1 (depth 3)
  311 -> 12 -> 11 -> 2 -> 1 (depth 4)
  221 -> 12 -> 11 -> 2 -> 1 (depth 4)
  2111 -> 13 -> 11 -> 2 -> 1 (depth 4)
  11111 -> 5 -> 1 (depth 2)
Summary: 1 partition has depth 1; 1 has depth 2; 2 have 3; and 3 have 4, so that the row for n = 5 is 1..1..2..3 .
		

Crossrefs

Row sums are A000041.
Column k = 2 is A032741.
Column k = 3 is A325245.
a(n!) = A325272(n).
Integer partition triangles: A008284 (first omega), A116608 (second omega), A325242 (third omega), A325268 (second-to-last omega), A225485 or A325280 (length/frequency depth).

Programs

  • Mathematica
    c[s_] := c[s] = Select[Table[Count[s, i], {i, 1, Max[s]}], # > 0 &]
    f[s_] := f[s] = Drop[FixedPointList[c, s], -2]
    t[s_] := t[s] = Length[f[s]]
    u[n_] := u[n] = Table[t[Part[IntegerPartitions[n], i]],
      {i, 1, Length[IntegerPartitions[n]]}];
    Flatten[Table[Count[u[n], k], {n, 2, 25}, {k, 1, Max[u[n]]}]]

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

A175804 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the n-th term of the k-th differences of partition numbers A000041.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, -1, 0, 1, 3, 2, 1, 1, 2, 5, -4, -2, -1, 0, 2, 7, 9, 5, 3, 2, 2, 4, 11, -21, -12, -7, -4, -2, 0, 4, 15, 49, 28, 16, 9, 5, 3, 3, 7, 22, -112, -63, -35, -19, -10, -5, -2, 1, 8, 30, 249, 137, 74, 39, 20, 10, 5, 3, 4, 12, 42, -539, -290, -153, -79, -40, -20, -10, -5, -2, 2, 14, 56
Offset: 0

Views

Author

Alois P. Heinz, Dec 04 2010

Keywords

Comments

Odlyzko showed that the k-th differences of A000041(n) alternate in sign with increasing n up to a certain index n_0(k) and then stay positive.
Are there any zeros after the first four, which all lie in columns k = 1, 2? - Gus Wiseman, Dec 15 2024

Examples

			Square array A(n,k) begins:
   1,  0,  1, -1,  2,  -4,   9,  ...
   1,  1,  0,  1, -2,   5, -12,  ...
   2,  1,  1, -1,  3,  -7,  16,  ...
   3,  2,  0,  2, -4,   9, -19,  ...
   5,  2,  2, -2,  5, -10,  20,  ...
   7,  4,  0,  3, -5,  10, -20,  ...
  11,  4,  3, -2,  5, -10,  22,  ...
		

Crossrefs

Columns k=0-5 give: A000041, A002865, A053445, A072380, A081094, A081095.
Main diagonal gives A379378.
For primes we have A095195 or A376682.
Row n = 0 is A281425.
Row n = 1 is A320590 except first term.
For composites we have A377033.
For squarefree numbers we have A377038.
For nonsquarefree numbers we have A377046.
For prime powers we have A377051.
Antidiagonal sums are A377056, absolute value version A378621.
The version for strict partitions is A378622, first column A293467.
A000009 counts strict integer partitions, differences A087897, A378972.

Programs

  • Maple
    A41:= combinat[numbpart]:
    DD:= proc(p) proc(n) option remember; p(n+1) -p(n) end end:
    A:= (n,k)-> (DD@@k)(A41)(n):
    seq(seq(A(n, d-n), n=0..d), d=0..11);
  • Mathematica
    max = 11; a41 = Array[PartitionsP, max+1, 0]; a[n_, k_] := Differences[a41, k][[n+1]]; Table[a[n, k-n], {k, 0, max}, {n, 0, k}] // Flatten (* Jean-François Alcover, Aug 29 2014 *)
    nn=5;Table[Table[Sum[(-1)^(k-i)*Binomial[k,i]*PartitionsP[n+i],{i,0,k}],{k,0,nn}],{n,0,nn}] (* Gus Wiseman, Dec 15 2024 *)

Formula

A(n,k) = (Delta^(k) A000041)(n).
A(n,k) = Sum_{i=0..k} (-1)^(k-i) * binomial(k,i) * A000041(n+i). In words, row x is the inverse zero-based binomial transform of A000041 shifted left x times. - Gus Wiseman, Dec 15 2024

A325268 Triangle read by rows where T(n,k) is the number of integer partitions of n with omicron k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 3, 0, 1, 0, 1, 5, 0, 0, 1, 0, 1, 7, 2, 0, 0, 1, 0, 1, 12, 1, 0, 0, 0, 1, 0, 1, 17, 2, 1, 0, 0, 0, 1, 0, 1, 24, 4, 0, 0, 0, 0, 0, 1, 0, 1, 33, 5, 1, 1, 0, 0, 0, 0, 1, 0, 1, 44, 9, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 57, 14, 3, 0, 1
Offset: 0

Views

Author

Gus Wiseman, Apr 18 2019

Keywords

Comments

The omega-sequence of an integer partition is the sequence of lengths of the multisets obtained by repeatedly taking the multiset of multiplicities until a singleton is reached. The omicron of the partition is 0 if the omega-sequence is empty, 1 if it is a singleton, and otherwise the second-to-last part. For example, the partition (32211) has chain of multisets of multiplicities {1,1,2,2,3} -> {1,2,2} -> {1,2} -> {1,1} -> {2}, so its omega-sequence is (5,3,2,2,1), and its omicron is 2.

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  1  3  0  1
  0  1  5  0  0  1
  0  1  7  2  0  0  1
  0  1 12  1  0  0  0  1
  0  1 17  2  1  0  0  0  1
  0  1 24  4  0  0  0  0  0  1
  0  1 33  5  1  1  0  0  0  0  1
  0  1 44  9  1  0  0  0  0  0  0  1
  0  1 57 14  3  0  1  0  0  0  0  0  1
  0  1 76 20  3  0  0  0  0  0  0  0  0  1
Row n = 8 counts the following partitions.
  (8)  (44)       (431)  (2222)  (11111111)
       (53)       (521)
       (62)
       (71)
       (332)
       (422)
       (611)
       (3221)
       (3311)
       (4211)
       (5111)
       (22211)
       (32111)
       (41111)
       (221111)
       (311111)
       (2111111)
		

Crossrefs

Row sums are A000041. Column k = 2 is A325267.
Omega-sequence statistics: A001222 (first omega), A001221 (second omega), A071625 (third omega), A323022 (fourth omega), A304465 (second-to-last omega), A182850 or A323014 (length/frequency depth), A325248 (Heinz number), A325249 (sum).
Integer partition triangles: A008284 (first omega), A116608 (second omega), A325242 (third omega), A325268 (second-to-last omega), A225485 or A325280 (length/frequency depth).

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Switch[#,{},0,{},1,,NestWhile[Sort[Length/@Split[#]]&,#,Length[#]>1&]//First]==k&]],{n,0,10},{k,0,n}]
  • PARI
    omicron(p)={if(!#p, 0, my(r=1); while(#p > 1, my(L=List(), k=0); r=#p; for(i=1, #p, if(i==#p||p[i]<>p[i+1], listput(L,i-k); k=i)); listsort(L); p=L); r)}
    row(n)={my(v=vector(1+n)); forpart(p=n, v[1 + omicron(Vec(p))]++); v}
    { for(n=0, 10, print(row(n))) } \\ Andrew Howroyd, Jan 18 2023

A329746 Triangle read by rows where T(n,k) is the number of integer partitions of n > 0 with runs-resistance k, 0 <= k <= n - 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 0, 1, 3, 4, 3, 0, 0, 1, 1, 4, 8, 1, 0, 0, 1, 3, 6, 10, 2, 0, 0, 0, 1, 2, 8, 13, 6, 0, 0, 0, 0, 1, 3, 11, 20, 7, 0, 0, 0, 0, 0, 1, 1, 11, 29, 14, 0, 0, 0, 0, 0, 0, 1, 5, 19, 31, 20, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

Examples

			Triangle begins:
  1
  1  1
  1  1  1
  1  2  1  1
  1  1  2  3  0
  1  3  4  3  0  0
  1  1  4  8  1  0  0
  1  3  6 10  2  0  0  0
  1  2  8 13  6  0  0  0  0
  1  3 11 20  7  0  0  0  0  0
  1  1 11 29 14  0  0  0  0  0  0
  1  5 19 31 20  1  0  0  0  0  0  0
  1  1 17 50 30  2  0  0  0  0  0  0  0
  1  3 25 64 37  5  0  0  0  0  0  0  0  0
  1  3 29 74 62  7  0  0  0  0  0  0  0  0  0
Row n = 8 counts the following partitions:
  (8)  (44)        (53)    (332)      (4211)
       (2222)      (62)    (422)      (32111)
       (11111111)  (71)    (611)
                   (431)   (3221)
                   (521)   (5111)
                   (3311)  (22211)
                           (41111)
                           (221111)
                           (311111)
                           (2111111)
		

Crossrefs

Row sums are A000041.
Column k = 1 is A032741.
Column k = 2 is A329745.
A similar invariant is frequency depth; see A323014, A325280.
The version for compositions is A329744.
The version for binary words is A329767.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[Length[Select[IntegerPartitions[n],runsres[#]==k&]],{n,10},{k,0,n-1}]
  • PARI
    \\ rr(p) gives runs resistance of partition.
    rr(p)={my(r=0); while(#p > 1, my(L=List(), k=0); for(i=1, #p, if(i==#p||p[i]<>p[i+1], listput(L, i-k); k=i)); p=Vec(L); r++); r}
    row(n)={my(v=vector(n)); forpart(p=n, v[1+rr(Vec(p))]++); v}
    { for(n=1, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023

A319411 Triangle read by rows: T(n,k) = number of binary vectors of length n with runs-resistance k (1 <= k <= n).

Original entry on oeis.org

2, 2, 2, 2, 2, 4, 2, 4, 6, 4, 2, 2, 12, 12, 4, 2, 6, 30, 18, 8, 0, 2, 2, 44, 44, 32, 4, 0, 2, 6, 82, 76, 74, 16, 0, 0, 2, 4, 144, 138, 172, 52, 0, 0, 0, 2, 6, 258, 248, 350, 156, 4, 0, 0, 0, 2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0, 2, 10, 790, 752, 1500, 938, 104, 0, 0, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 20 2018

Keywords

Comments

"Runs-resistance" is defined in A318928.
Row sums are 2,4,8,16,... (the binary vectors may begin with 0 or 1).
This is similar to A329767 but without the k = 0 column and with a different row n = 1. - Gus Wiseman, Nov 25 2019

Examples

			Triangle begins:
2,
2, 2,
2, 2, 4,
2, 4, 6, 4,
2, 2, 12, 12, 4,
2, 6, 30, 18, 8, 0,
2, 2, 44, 44, 32, 4, 0,
2, 6, 82, 76, 74, 16, 0, 0,
2, 4, 144, 138, 172, 52, 0, 0, 0,
2, 6, 258, 248, 350, 156, 4, 0, 0, 0,
2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0,
2, 10, 790, 752, 1500, 938, 104, 0, 0, 0, 0, 0,
...
Lenormand gives the first 20 rows.
The calculation of row 4 is as follows.
We may assume the first bit is a 0, and then double the answers.
vector / runs / steps to reach a single number:
0000 / 4 / 1
0001 / 31 -> 11 -> 2 / 3
0010 / 211 -> 12 -> 11 -> 2 / 4
0011 / 22 -> 2 / 2
0100 / 112 -> 21 -> 11 -> 2 / 4
0101 / 1111 -> 4 / 2
0110 / 121 -> 111 -> 3 / 3
0111 / 13 -> 11 -> 2 / 3
and we get 1 (once), 2 (twice), 3 (three times) and 4 (twice).
So row 4 is: 2,4,6,4.
		

Crossrefs

Row sums are A000079.
Column k = 2 is 2 * A032741 = A319410.
Column k = 3 is 2 * A329745 (because runs-resistance 2 for compositions corresponds to runs-resistance 3 for binary words).
The version for compositions is A329744.
The version for partitions is A329746.
The number of nonzero entries in row n > 0 is A319412(n).
The runs-resistance of the binary expansion of n is A318928.

Programs

  • Mathematica
    runsresist[q_]:=If[Length[q]==1,1,Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1];
    Table[Length[Select[Tuples[{0,1},n],runsresist[#]==k&]],{n,10},{k,n}] (* Gus Wiseman, Nov 25 2019 *)
Showing 1-10 of 52 results. Next