1, 1, 2, 2, 4, 2, 10, 2, 16, 8, 34, 2, 100, 2, 130, 38, 256, 2, 1000, 2, 1156, 134, 2050, 2, 10000, 32, 8194, 512, 16900, 2, 146854, 2, 65536, 2054, 131074, 158, 1000000, 2, 524290, 8198, 1336336, 2, 11680390, 2, 4202500, 54872, 8388610, 2, 100000000, 128
Offset: 0
A326512
Number of set partitions of {1..n} where every block has the same average.
Original entry on oeis.org
1, 1, 1, 2, 2, 5, 5, 18, 16, 75, 64, 405, 302, 2581, 1693, 19872, 11295, 175807, 87524, 1851135, 787515, 21909766, 8185713, 298698113, 96514608, 4538610230, 1285072142
Offset: 0
The a(1) = 1 through a(7) = 18 set partitions:
{1} {12} {123} {1234} {12345} {123456} {1234567}
{13}{2} {14}{23} {1245}{3} {1256}{34} {123567}{4}
{135}{24} {1346}{25} {12467}{35}
{15}{234} {16}{2345} {1267}{345}
{15}{24}{3} {16}{25}{34} {13457}{26}
{1357}{246}
{1456}{237}
{147}{2356}
{156}{2347}
{17}{23456}
{1267}{35}{4}
{1357}{26}{4}
{147}{26}{35}
{156}{237}{4}
{17}{2356}{4}
{17}{246}{35}
{17}{26}{345}
{17}{26}{35}{4}
Cf.
A000110,
A007837,
A035470,
A038041,
A070925,
A275780,
A306017,
A306021,
A319169,
A326513,
A326515,
A326520,
A326536.
-
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
Table[Length[Select[sps[Range[n]],SameQ@@Mean/@#&]],{n,0,8}]
A222955
Number of nX1 0..1 arrays with every row and column least squares fitting to a zero slope straight line, with a single point array taken as having zero slope.
Original entry on oeis.org
2, 2, 4, 4, 8, 8, 20, 18, 52, 48, 152, 138, 472, 428, 1520, 1392, 5044, 4652, 17112, 15884, 59008, 55124, 206260, 193724, 729096, 688008, 2601640, 2465134, 9358944, 8899700, 33904324, 32342236, 123580884, 118215780, 452902072, 434314138, 1667837680
Offset: 1
All solutions for n=4
..0....1....1....0
..0....1....0....1
..0....1....0....1
..0....1....1....0
From _Gus Wiseman_, Jan 07 2023: (Start)
The a(1) = 2 through a(7) = 20 binary words with least squares fit a line of zero slope are:
(0) (00) (000) (0000) (00000) (000000) (0000000)
(1) (11) (010) (0110) (00100) (001100) (0001000)
(101) (1001) (01010) (010010) (0010100)
(111) (1111) (01110) (011110) (0011100)
(10001) (100001) (0100010)
(10101) (101101) (0101010)
(11011) (110011) (0110001)
(11111) (111111) (0110110)
(0111001)
(0111110)
(1000001)
(1000110)
(1001001)
(1001110)
(1010101)
(1011101)
(1100011)
(1101011)
(1110111)
(1111111)
(End)
These words appear to be ranked by
A359402.
A359042 adds up partial sums of standard compositions, reversed
A029931.
A362046
Number of nonempty subsets of {1..n} with mean n/2.
Original entry on oeis.org
0, 0, 1, 1, 3, 3, 9, 8, 25, 23, 75, 68, 235, 213, 759, 695, 2521, 2325, 8555, 7941, 29503, 27561, 103129, 96861, 364547, 344003, 1300819, 1232566, 4679471, 4449849, 16952161, 16171117, 61790441, 59107889, 226451035, 217157068, 833918839, 801467551, 3084255127
Offset: 0
The a(2) = 1 through a(7) = 8 subsets:
{1} {1,2} {2} {1,4} {3} {1,6}
{1,3} {2,3} {1,5} {2,5}
{1,2,3} {1,2,3,4} {2,4} {3,4}
{1,2,6} {1,2,4,7}
{1,3,5} {1,2,5,6}
{2,3,4} {1,3,4,6}
{1,2,3,6} {2,3,4,5}
{1,2,4,5} {1,2,3,4,5,6}
{1,2,3,4,5}
Including the empty set gives
A133406.
A000980 counts nonempty subsets of {1..2n-1} with mean n.
A327481 counts subsets by integer mean.
-
Table[Length[Select[Subsets[Range[n]],Mean[#]==n/2&]],{n,0,15}]
A133406
Half the number of ways of placing up to n pawns on a length n chessboard row so that the row balances at its middle.
Original entry on oeis.org
1, 1, 2, 2, 4, 4, 10, 9, 26, 24, 76, 69, 236, 214, 760, 696, 2522, 2326, 8556, 7942, 29504, 27562, 103130, 96862, 364548, 344004, 1300820, 1232567, 4679472, 4449850, 16952162, 16171118, 61790442, 59107890, 226451036, 217157069, 833918840
Offset: 1
From _Gus Wiseman_, Apr 23 2023: (Start)
The a(1) = 1 through a(8) = 9 subsets:
{} {} {} {} {} {} {} {}
{1} {1,2} {2} {1,4} {3} {1,6}
{1,3} {2,3} {1,5} {2,5}
{1,2,3} {1,2,3,4} {2,4} {3,4}
{1,2,6} {1,2,4,7}
{1,3,5} {1,2,5,6}
{2,3,4} {1,3,4,6}
{1,2,3,6} {2,3,4,5}
{1,2,4,5} {1,2,3,4,5,6}
{1,2,3,4,5}
(End)
For median instead of mean we have
A361801 + 1, the doubling of
A024718.
Not counting the empty set gives
A362046 (shifted left).
-
Table[Length[Select[Subsets[Range[n]],Length[#]==0||Mean[#]==n/2&]],{n,0,10}] (* Gus Wiseman, Apr 23 2023 *)
-
a(n) = {polcoef(prod(k=1, n, 1 + 'x^(2*k-n-1)), 0)/2} \\ Andrew Howroyd, Jan 07 2023
Original entry on oeis.org
0, 1, 3, 9, 25, 75, 235, 759, 2521, 8555, 29503, 103129, 364547, 1300819, 4679471, 16952161, 61790441, 226451035, 833918839, 3084255127, 11451630043, 42669225171, 159497648599, 597950875255, 2247724108771, 8470205600639
Offset: 0
From _Gus Wiseman_, Apr 15 2023: (Start)
The a(1) = 1 through a(3) = 9 subsets:
{1} {2} {3}
{1,3} {1,5}
{1,2,3} {2,4}
{1,2,6}
{1,3,5}
{2,3,4}
{1,2,3,6}
{1,2,4,5}
{1,2,3,4,5}
(End)
A000980 counts nonempty subsets of {1..2n-1} with mean n.
A327475 counts subsets with integer mean.
-
Table[Length[Select[Subsets[Range[2n]],Mean[#]==n&]],{n,0,6}] (* Gus Wiseman, Apr 15 2023 *)
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 *)
Comments