A361911
Number of set partitions of {1..n} with block-medians summing to an integer.
Original entry on oeis.org
1, 1, 3, 10, 30, 107, 479, 2249, 11173, 60144, 351086, 2171087, 14138253, 97097101, 701820663, 5303701310, 41838047938, 343716647215, 2935346815495, 25999729551523, 238473713427285, 2261375071834708, 22141326012712122, 223519686318676559, 2323959300370456901
Offset: 1
The a(1) = 1 through a(4) = 10 set partitions:
{{1}} {{1}{2}} {{123}} {{1}{234}}
{{13}{2}} {{12}{34}}
{{1}{2}{3}} {{123}{4}}
{{124}{3}}
{{13}{24}}
{{134}{2}}
{{14}{23}}
{{1}{24}{3}}
{{13}{2}{4}}
{{1}{2}{3}{4}}
The set partition {{1,4},{2,3}} has medians {5/2,5/2}, with sum 5, so is counted under a(4).
For median instead of sum we have
A361864.
For mean instead of median we have
A361866.
A308037 counts set partitions with integer average block-size.
-
sps[{}]:={{}}; sps[set:{i_,_}] := Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]] /@ Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]], IntegerQ[Total[Median/@#]]&]],{n,10}]
A047997
Triangle of numbers a(n,k) = number of balance positions when k equal weights are placed at a k-subset of the points {-n, -(n-1), ..., n-1, n} on a centrally pivoted rod.
Original entry on oeis.org
1, 1, 2, 1, 3, 5, 1, 4, 8, 12, 1, 5, 13, 24, 32, 1, 6, 18, 43, 73, 94, 1, 7, 25, 69, 141, 227, 289, 1, 8, 32, 104, 252, 480, 734, 910, 1, 9, 41, 150, 414, 920, 1656, 2430, 2934, 1, 10, 50, 207, 649, 1636, 3370, 5744, 8150, 9686, 1, 11, 61, 277, 967
Offset: 1
From _Gus Wiseman_, Apr 18 2023: (Start)
Triangle begins:
1
1 2
1 3 5
1 4 8 12
1 5 13 24 32
1 6 18 43 73 94
1 7 25 69 141 227 289
1 8 32 104 252 480 734 910
1 9 41 150 414 920 1656 2430 2934
Row n = 4 counts the following balanced subsets:
{0} {-1,1} {-1,0,1} {-3,0,1,2}
{-2,2} {-2,0,2} {-4,0,1,3}
{-3,3} {-3,0,3} {-2,-1,0,3}
{-4,4} {-3,1,2} {-2,-1,1,2}
{-4,0,4} {-3,-1,0,4}
{-4,1,3} {-3,-1,1,3}
{-2,-1,3} {-3,-2,1,4}
{-3,-1,4} {-3,-2,2,3}
{-4,-1,1,4}
{-4,-1,2,3}
{-4,-2,2,4}
{-4,-3,3,4}
(End)
Last column is a(n,n) =
A002838(n).
A327475 counts subsets with integer mean.
-
a[n_, k_] := Length[ IntegerPartitions[ n*(2k - n + 1)/2, n, Range[2k - n + 1]]]; Flatten[ Table[ a[n, k], {k, 1, 11}, {n, 1, k}]] (* Jean-François Alcover, Jan 02 2012 *)
Table[Length[Select[Subsets[Range[-n,n]],Length[#]==k&&Total[#]==0&]],{n,8},{k,n}] (* Gus Wiseman, Apr 16 2023 *)
A327483
Triangle read by rows where T(n,k) is the number of integer partitions of 2^n with mean 2^k, 0 <= k <= n.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 5, 4, 1, 1, 22, 34, 8, 1, 1, 231, 919, 249, 16, 1, 1, 8349, 112540, 55974, 1906, 32, 1, 1, 1741630, 107608848, 161410965, 4602893, 14905, 64, 1, 1, 4351078600, 1949696350591, 12623411092535, 676491536028, 461346215, 117874, 128, 1
Offset: 0
Triangle begins:
1
1 1
1 2 1
1 5 4 1
1 22 34 8 1
1 231 919 249 16 1
1 8349 112540 55974 1906 32 1
1 1741630 107608848 161410965 4602893 14905 64 1
...
Column k = 1 is
A068413 (shifted once to the right).
-
Table[Length[Select[IntegerPartitions[2^n],Mean[#]==2^k&]],{n,0,5},{k,0,n}]
-
from sympy.utilities.iterables import partitions
from sympy import npartitions
def A327483_T(n,k):
if k == 0 or k == n: return 1
if k == n-1: return 1<Chai Wah Wu, Sep 21 2023
-
# uses A008284_T
def A327483_T(n,k): return A008284_T(1<Chai Wah Wu, Sep 21 2023
A361865
Number of set partitions of {1..n} such that the mean of the means of the blocks is an integer.
Original entry on oeis.org
1, 0, 3, 2, 12, 18, 101, 232, 1547, 3768, 24974, 116728, 687419, 3489664, 26436217, 159031250, 1129056772
Offset: 1
The set partition y = {{1,4},{2,5},{3}} has block-means {5/2,7/2,3}, with mean 3, so y is counted under a(5).
The a(1) = 1 through a(5) = 12 set partitions:
{{1}} . {{123}} {{1}{234}} {{12345}}
{{13}{2}} {{123}{4}} {{1245}{3}}
{{1}{2}{3}} {{135}{24}}
{{15}{234}}
{{1}{234}{5}}
{{12}{3}{45}}
{{135}{2}{4}}
{{14}{25}{3}}
{{15}{24}{3}}
{{1}{24}{3}{5}}
{{15}{2}{3}{4}}
{{1}{2}{3}{4}{5}}
For median instead of mean we have
A361864.
A308037 counts set partitions whose block-sizes have integer mean.
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]],IntegerQ[Mean[Mean/@#]]&]],{n,6}]
A327478
Numbers whose average binary index is also a binary index.
Original entry on oeis.org
1, 2, 4, 7, 8, 14, 16, 21, 28, 31, 32, 39, 42, 56, 57, 62, 64, 73, 78, 84, 93, 107, 112, 114, 124, 127, 128, 141, 146, 155, 156, 168, 175, 177, 186, 214, 217, 224, 228, 245, 248, 254, 256, 267, 273, 282, 287, 292, 310, 312, 313, 336, 341, 350, 354, 371, 372
Offset: 1
The sequence of terms together with their binary indices begins:
1: 1
2: 2
4: 3
7: 1 2 3
8: 4
14: 2 3 4
16: 5
21: 1 3 5
28: 3 4 5
31: 1 2 3 4 5
32: 6
39: 1 2 3 6
42: 2 4 6
56: 4 5 6
57: 1 4 5 6
61: 2 3 4 5 6
Numbers whose binary indices have integer mean are
A326669.
Cf.
A000016,
A000120,
A029931,
A048793,
A065795,
A070939,
A237984,
A240850,
A327473,
A327474,
A327481.
-
bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
Select[Range[100],MemberQ[bpe[#],Mean[bpe[#]]]&]
A327484
Number of integer partitions of 2^n whose mean is a power of 2.
Original entry on oeis.org
1, 2, 4, 11, 66, 1417, 178803, 275379307, 15254411521973, 108800468645440803267, 964567296140908420613296779144, 219614169629364529542990295052656098001967511, 38626966436500261962963100479469496821891576834974275502742922521
Offset: 0
The a(0) = 1 through a(3) = 11 partitions:
(1) (2) (4) (8)
(11) (22) (44)
(31) (53)
(1111) (62)
(71)
(2222)
(3221)
(3311)
(4211)
(5111)
(11111111)
-
Table[Length[Select[IntegerPartitions[2^n],IntegerQ[Mean[#]]&]],{n,0,5}]
-
from sympy.utilities.iterables import partitions
def A327484(n): return sum(1 for s,p in partitions(1<Chai Wah Wu, Sep 21 2023
-
# uses A008284_T
def A327484(n): return sum(A008284_T(1<Chai Wah Wu, Sep 21 2023
A361910
Number of set partitions of {1..n} such that the mean of the means of the blocks is (n+1)/2.
Original entry on oeis.org
1, 2, 3, 7, 12, 47, 99, 430, 1379, 5613, 21416, 127303, 532201, 3133846, 18776715, 114275757, 737859014
Offset: 1
The a(1) = 1 through a(5) = 12 set partitions:
{{1}} {{12}} {{123}} {{1234}} {{12345}}
{{1}{2}} {{13}{2}} {{12}{34}} {{1245}{3}}
{{1}{2}{3}} {{13}{24}} {{135}{24}}
{{14}{23}} {{15}{234}}
{{1}{23}{4}} {{1}{234}{5}}
{{14}{2}{3}} {{12}{3}{45}}
{{1}{2}{3}{4}} {{135}{2}{4}}
{{14}{25}{3}}
{{15}{24}{3}}
{{1}{24}{3}{5}}
{{15}{2}{3}{4}}
{{1}{2}{3}{4}{5}}
The set partition {{1,3},{2,4}} has means {2,3}, with mean 5/2, so is counted under a(4).
The set partition {{1,3,5},{2,4}} has means {3,3}, with mean 3, so is counted under a(5).
For median instead of mean we have
A361863.
A308037 counts set partitions with integer mean block-size.
A327475 counts subsets with integer mean,
A000975 with integer median.
A361865 counts set partitions with integer mean of means.
A361911 counts set partitions with integer sum of means.
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]] /@ Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]],Mean[Join@@#]==Mean[Mean/@#]&]],{n,8}]
A361863
Number of set partitions of {1..n} such that the median of medians of the blocks is (n+1)/2.
Original entry on oeis.org
1, 2, 3, 9, 26, 69, 335, 1018, 6629, 22805, 182988, 703745
Offset: 1
The a(1) = 1 through a(4) = 9 set partitions:
{{1}} {{12}} {{123}} {{1234}}
{{1}{2}} {{13}{2}} {{12}{34}}
{{1}{2}{3}} {{124}{3}}
{{13}{24}}
{{134}{2}}
{{14}{23}}
{{1}{23}{4}}
{{14}{2}{3}}
{{1}{2}{3}{4}}
The set partition {{1,4},{2,3}} has medians {5/2,5/2}, with median 5/2, so is counted under a(4).
The set partition {{1,3},{2,4}} has medians {2,3}, with median 5/2, so is counted under a(4).
For mean instead of median we have
A361910.
A361864 counts set partitions with integer median of medians, means
A361865.
A361866 counts set partitions with integer sum of medians, means
A361911.
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]& /@ sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]],(n+1)/2==Median[Median/@#]&]],{n,6}]
A361802
Irregular triangle read by rows where T(n,k) is the number of k-subsets of {-n+1,...,n} with sum 0, for k = 1,...,2n-1.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 7, 5, 2, 1, 1, 4, 10, 16, 18, 14, 8, 3, 1, 1, 5, 15, 31, 46, 51, 43, 27, 12, 3, 1, 1, 6, 21, 53, 98, 139, 155, 134, 88, 43, 16, 4, 1, 1, 7, 28, 83, 184, 319, 441, 486, 424, 293, 161, 68, 21, 4, 1
Offset: 1
Triangle begins:
1
1 1 1
1 2 3 2 1
1 3 6 7 5 2 1
1 4 10 16 18 14 8 3 1
1 5 15 31 46 51 43 27 12 3 1
1 6 21 53 98 139 155 134 88 43 16 4 1
1 7 28 83 184 319 441 486 424 293 161 68 21 4 1
Row n = 3 counts the following subsets:
{0} {-1,1} {-1,0,1} {-2,-1,0,3} {-2,-1,0,1,2}
{-2,2} {-2,0,2} {-2,-1,1,2}
{-2,-1,3}
A067538 counts partitions with integer mean.
-
Table[Length[Select[Subsets[Range[-n+1,n],{k}],Total[#]==0&]],{n,6},{k,2n-1}]
Comments