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.

Previous Showing 31-36 of 36 results.

A372121 Row sums of A371783 and A371954 (k-quanimous partitions).

Original entry on oeis.org

1, 3, 4, 9, 8, 22, 16, 42, 41, 74, 57, 183, 102, 233, 263, 463, 298, 875, 491, 1350, 1172, 1775, 1256, 4273, 2225, 4399, 4584, 8049, 4566, 14913, 6843, 18539, 15831, 22894, 18196, 53323, 21638, 48947, 50281, 94500, 44584, 144976, 63262, 173436, 169361, 202153
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2024

Keywords

Comments

A finite multiset of numbers is defined to be k-quanimous iff it can be partitioned into k multisets with equal sums. The triangles A371783 and A371954 count k-quanimous partitions.

Crossrefs

Row sums of A371783.
Row sums of A371954.
A000005 counts divisors.
A000041 counts integer partitions.
A002219 (aerated) counts biquanimous partitions, ranks A357976.
A321452 counts quanimous partitions, complement A321451.
A371796 counts quanimous sets, differences A371797.

Programs

  • Mathematica
    hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]*k]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]], {d,Rest[Divisors[n]]}]];
    Table[Sum[Length[Select[IntegerPartitions[n], Select[facs[Times@@Prime/@#], Length[#]==k&&SameQ@@hwt/@#&]!={}&]],{k,Divisors[n]}],{n,1,10}]
  • PARI
    T(n, d) = my(v=partitions(n/d), w=List([])); forvec(s=vector(d, i, [1, #v]), listput(w, vecsort(concat(vector(d, i, v[s[i]])))), 1); #Set(w);
    a(n) = sumdiv(n, d, T(n, d)); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A372122 Number of strict triquanimous partitions of 3n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 4, 5, 13, 18, 36, 51, 93, 132, 229, 315, 516, 735, 1134, 1575, 2407, 3309, 4878, 6710, 9690, 13168, 18744, 25114, 35050, 47210, 64503, 85573, 116445, 153328, 205367, 269383, 356668, 464268, 610644, 788274, 1026330, 1321017, 1704309, 2176054
Offset: 0

Views

Author

Gus Wiseman, Apr 20 2024

Keywords

Comments

A finite multiset of numbers is defined to be triquanimous iff it can be partitioned into three multisets with equal sums. Triquanimous partitions are counted by A002220 and ranked by A371955.

Examples

			The partition (11,7,5,4,3,2,1) has qualifying set partitions {{11},{4,7},{1,2,3,5}} and {{11},{1,3,7},{2,4,5}} so is counted under a(11).
The a(5) = 1 through a(9) = 13 partitions:
  (5,4,3,2,1)  (6,5,4,2,1)  (7,5,4,3,2)    (8,6,5,3,2)    (9,6,5,4,3)
                            (7,6,4,3,1)    (8,7,5,3,1)    (9,7,5,4,2)
                            (7,6,5,2,1)    (8,7,6,2,1)    (9,7,6,3,2)
                            (6,5,4,3,2,1)  (7,6,5,3,2,1)  (9,8,5,4,1)
                                           (8,6,4,3,2,1)  (9,8,6,3,1)
                                                          (9,8,7,2,1)
                                                          (7,6,5,4,3,2)
                                                          (8,6,5,4,3,1)
                                                          (8,7,5,4,2,1)
                                                          (8,7,6,3,2,1)
                                                          (9,6,5,4,2,1)
                                                          (9,7,5,3,2,1)
                                                          (9,8,4,3,2,1)
		

Crossrefs

The non-strict biquanimous version is A002219, ranks A357976.
The non-strict version is A002220, ranks A371955.
The biquanimous version is A237258, ranks A357854.
A321451 counts non-quanimous partitions, ranks A321453.
A321452 counts quanimous partitions, ranks A321454, strict A371737.
A371783 counts k-quanimous partitions.
A371795 counts non-biquanimous partitions, even case A006827, ranks A371731.

Programs

  • Mathematica
    hwt[n_]:=Total[Cases[FactorInteger[n],{p_,k_}:>PrimePi[p]*k]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&, Select[facs[n/d],Min@@#>=d&]], {d,Rest[Divisors[n]]}]];
    Table[Length[Select[IntegerPartitions[3n], UnsameQ@@#&&Select[facs[Times@@Prime/@#], Length[#]==3&&SameQ@@hwt/@#&]!={}&]],{n,0,10}]

Extensions

More terms from Jinyuan Wang, Mar 30 2025

A381872 Number of multisets that can be obtained by taking the sum of each block of a multiset partition of the prime indices of n into blocks having a common sum.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Mar 14 2025

Keywords

Comments

First differs from A321455 at a(144) = 4, A321455(144) = 3.
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, sum A056239.

Examples

			The prime indices of 144 are {1,1,1,1,2,2}, with the following 4 multiset partitions having common block sum:
  {{1,1,1,1,2,2}}
  {{2,2},{1,1,1,1}}
  {{1,1,2},{1,1,2}}
  {{2},{2},{1,1},{1,1}}
with sums: 8, 4, 4, 2, of which 3 are distinct, so a(144) = 3.
The prime indices of 1296 are {1,1,1,1,2,2,2,2}, with the following 7 multiset partitions having common block sum:
  {{1,1,1,1,2,2,2,2}}
  {{2,2,2},{1,1,1,1,2}}
  {{1,1,2,2},{1,1,2,2}}
  {{2,2},{2,2},{1,1,1,1}}
  {{2,2},{1,1,2},{1,1,2}}
  {{1,2},{1,2},{1,2},{1,2}}
  {{2},{2},{2},{2},{1,1},{1,1}}
with sums: 12, 6, 6, 4, 4, 3, 2, of which 5 are distinct, so a(1296) = 5.
		

Crossrefs

With equal blocks instead of sums we have A089723.
Without equal sums we have A317141, before sums A001055, lower A300383.
Positions of terms > 1 are A321454.
Before taking sums we had A321455.
With distinct instead of equal sums we have A381637, before sums A321469.
A000041 counts integer partitions, strict A000009, constant A000005.
A055396 gives least prime index, greatest A061395.
A056239 adds up prime indices, row sums of A112798.
A265947 counts refinement-ordered pairs of integer partitions.
Other multiset partitions of prime indices:
- For multisets of constant multisets (A000688) see A381455 (upper), A381453 (lower).
- For sets of constant multisets (A050361) see A381715.
- For sets of constant multisets with distinct sums (A381635) see A381716, A381636.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[mset_]:=Union[Sort[Sort/@(#/.x_Integer:>mset[[x]])]&/@sps[Range[Length[mset]]]];
    Table[Length[Union[Sort[Total/@#]&/@Select[mps[prix[n]],SameQ@@Total/@#&]]],{n,100}]

A371732 Numbers n such that each binary index k (from row n of A048793) has the same sum of binary indices A029931(k).

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 32, 64, 128, 144, 256, 288, 512, 576, 1024, 2048, 3072, 4096, 8192, 16384, 32768, 32800, 33024, 33056, 65536, 65600, 66048, 66112, 131072, 132096, 133120, 134144, 262144, 266240, 524288, 528384, 786432, 790528, 1048576, 1056768, 2097152
Offset: 1

Views

Author

Gus Wiseman, Apr 13 2024

Keywords

Examples

			The terms together with their binary expansions and binary indices begin:
        1:                1 ~ {1}
        2:               10 ~ {2}
        4:              100 ~ {3}
        8:             1000 ~ {4}
       12:             1100 ~ {3,4}
       16:            10000 ~ {5}
       32:           100000 ~ {6}
       64:          1000000 ~ {7}
      128:         10000000 ~ {8}
      144:         10010000 ~ {5,8}
      256:        100000000 ~ {9}
      288:        100100000 ~ {6,9}
      512:       1000000000 ~ {10}
      576:       1001000000 ~ {7,10}
     1024:      10000000000 ~ {11}
     2048:     100000000000 ~ {12}
     3072:     110000000000 ~ {11,12}
     4096:    1000000000000 ~ {13}
     8192:   10000000000000 ~ {14}
    16384:  100000000000000 ~ {15}
    32768: 1000000000000000 ~ {16}
    32800: 1000000000100000 ~ {6,16}
		

Crossrefs

For prime instead of binary indices we have A326534.
A048793 lists binary indices, A000120 length, A272020 reverse, A029931 sum.
A058891 counts set-systems, A003465 covering, A323818 connected.
A070939 gives length of binary expansion.
A096111 gives product of binary indices.
A321142 and A371794 count non-biquanimous strict partitions.
A321452 counts quanimous partitions, ranks A321454.
A326031 gives weight of the set-system with BII-number n.
A357976 ranks the biquanimous partitions counted by A002219 aerated.
A371731 ranks the non-biquanimous partitions counted by A371795, A006827.

Programs

  • Mathematica
    bix[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    Select[Range[1000],SameQ@@Total/@bix/@bix[#]&]

A387388 a(n) is the maximum number of ways in which any strict partition of 2n can be partitioned into two disjoint subsets of equal sum.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4, 4, 4, 7, 6, 6, 6, 6, 11, 11, 10, 10, 10, 19, 18, 18, 18, 17, 35, 33, 32, 32, 31, 31, 62, 60, 58, 57, 57, 55, 56, 108, 105, 103, 101, 100, 100, 99, 195, 191, 187, 184, 182, 181, 180, 361, 352, 344, 340, 336, 333
Offset: 1

Views

Author

Jesús Bellver Arnau, Aug 28 2025

Keywords

Comments

Finding the number of ways in which a set can be partitioned into two disjoint subsets with equal sum is often referred to as the "partition search problem".
The sequence is defined for partitions of 2n because for odd numbers there are no solutions.

Examples

			a(2) = 0, because strict partitions of 4 are {4} and {3,1}. None of these partitions can be partitioned into two disjoint subsets of equal sum.
a(3) = 1, because strict partitions of 6 are {6}, {5,1}, {4,2} and {3,2,1}. There is one way to partition {3,2,1} into two disjoint subsets of equal sum: {3}={2,1}. For the other partitions, this cannot be done.
a(11) = 2, because among the 89 strict partitions of 22 there is {7, 5, 4, 3, 2, 1}. There are two ways to partition {7, 5, 4, 3, 2, 1} into two disjoint subsets of equal sum: {7,4}={5,3,2,1} and {7,3,1}={5,4,2}. And this cannot be done in three ways for any strict partition of 22.
		

Crossrefs

Programs

  • Python
    def partitions_distinct(n):
        def _build(remaining, max_next):
            if remaining == 0:
                return [[]]
            res = []
            for k in range(min(remaining, max_next), 0, -1):
                for tail in _build(remaining - k, k - 1):
                    res.append([k] + tail)
            return res
        return _build(n, n//2) # The biggest number in the subset can't be bigger than n/2
    def count_half_subsets(partition, n):
        if n % 2:
            return 0
        half = n // 2
        dp = [0] * (half + 1)
        dp[0] = 1
        for x in partition:
            for s in range(half, x - 1, -1):
                dp[s] += dp[s - x]
        return int(dp[half]/2) #-> to not count {X}={Y} and {Y}={X} as two different solutions
    #---- Generate Sequence -----
    sequence = []
    max_n=25  #number of terms
    for N in range(1, max_n):
        parts = partitions_distinct(2*N)
        max_sols = 0
        for p in parts:
            subsets = count_half_subsets(p, 2*N)
            if subsets > max_sols:
                max_sols = subsets
        sequence.append(max_sols)

A387389 a(n) is the smallest positive integer for which there exists a strict partition that can be partitioned into two disjoint subsets with equal sum in n ways.

Original entry on oeis.org

6, 22, 32, 28, 40, 38, 36, 52, 50, 48, 46, 66, 64, 64, 62, 62, 60, 58, 56, 80, 80, 78, 78, 76, 78, 76, 74, 74, 72, 72, 70, 70, 68, 96, 66, 96, 94, 96, 92, 94, 92, 92, 90, 92, 90, 88, 88, 90, 86, 88, 86, 86, 84, 84, 84, 82, 82, 82, 80, 80, 110, 78, 112, 114
Offset: 1

Views

Author

Jesús Bellver Arnau, Aug 28 2025

Keywords

Comments

Finding ways in which a set can be partitioned into two disjoint subsets with equal sum is often referred to as the "partition search problem".
All the numbers in the sequence are even because for odd numbers there is no solution to the partition search problem.

Examples

			a(1) = 6, because S={3,2,1} is a strict partition of 6 and there is a way to partition S into two disjoint subsets of equal sum: {3}={2,1}. It is not possible to do this for any strict partition of integers smaller than 6.
a(2) = 22, because S={7, 5, 4, 3, 2, 1} is a strict partition of 22 and there are two ways to partition S into two disjoint subsets of equal sum: {7,4}={5,3,2,1} and {7,3,1}={5,4,2}. There are no strict partitions of any smaller number for which this can be done.
a(3) = 32, because S={11, 6, 5, 4, 3, 2, 1} is a strict partition of 32 and there are three ways to partition S into two disjoint subsets of equal sum: {11,5}={6,4,3,2,1}, {11,4,1}={6,5,3,2} and {11,3,2}={6,5,4,1}. There are no strict partitions of any smaller number for which this can be done.
		

Crossrefs

Programs

  • Python
    def partitions_distinct(n):
        def _build(remaining, max_next):
            if remaining == 0:
                return [[]]
            res = []
            for k in range(min(remaining, max_next), 0, -1):
                for tail in _build(remaining - k, k - 1):
                    res.append([k] + tail)
            return res
        return _build(n, n//2) # The biggest number in the subset can't be bigger than n/2
    def count_half_subsets(partition, n):
        if n % 2:
            return 0
        half = n // 2
        dp = [0] * (half + 1)
        dp[0] = 1
        for x in partition:
            for s in range(half, x - 1, -1):
                dp[s] += dp[s - x]
        return int(dp[half]/2) #-> to not count {X}={Y} and {Y}={X} as two different solutions
    #---- Generate Sequence -----
    max_n = 15 #number of terms
    sequence = []
    for n in range(1, max_n):
        p_N_exists = False
        N=1
        while p_N_exists==False:
            partes = partitions_distinct(2*N)
            for p in partes:
                subsets = count_half_subsets(p, 2*N)
                if subsets == n:
                    sequence.append(2*N)
                    p_N_exists = True
                    break
            N = N+1
Previous Showing 31-36 of 36 results.