login
A212140
Number of k-element subsets S of {1,...,n} such that mean(S) is not equal to median(S).
3
0, 0, 0, 2, 8, 26, 68, 164, 370, 806, 1706, 3554, 7312, 14930, 30312, 61318, 123700, 249096, 500912, 1006316
OFFSET
1,4
COMMENTS
Row sums of the triangular array at A212148.
MATHEMATICA
t[n_, k_] := t[n, k] = Count[Map[Median[#] == Mean[#] &, Subsets[Range[n], {k}]], False]
Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
s[n_] := Sum[t[n, k], {k, 1, n}]
Table[s[n], {n, 1, 20}] (* A212140 *)
%/2 (* A212149 *)
(* Peter J. C. Moses, May 01 2012 *)
CROSSREFS
Sequence in context: A211885 A101696 A155861 * A357283 A136594 A268502
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 06 2012
STATUS
approved