login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A212148
Triangular array: T(n,k) is the number of k-element subsets S of {1,...,n} such that mean(S) is not equal to median(S).
1
0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 2, 0, 0, 0, 14, 8, 4, 0, 0, 0, 26, 22, 16, 4, 0, 0, 0, 44, 48, 46, 20, 6, 0, 0, 0, 68, 92, 108, 66, 30, 6, 0, 0, 0, 100, 160, 222, 174, 106, 36, 8, 0, 0, 0, 140, 260, 414, 396, 298, 142, 48, 8, 0, 0, 0, 190, 400, 720, 810, 728, 440
OFFSET
1,9
COMMENTS
Row sums: A212140.
EXAMPLE
First 7 rows:
0
0...0
0...0...0
0...0...2....0
0...0...6....2....0
0...0...14...8....4...0
0...0...26...22...16...4...0
The subsets counted by T(5,3) are {1,2,4}, {1,2,5}, {1,3,4}, {1,4,5}, {2,3,5}, {2,4,5}.
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
Cf. A212139.
Sequence in context: A158360 A309746 A094315 * A364988 A358622 A336563
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, May 06 2012
STATUS
approved