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.

A212149 Number of k-element subsets S of {1,...,n} such that mean(S)

This page as a plain text file.
%I A212149 #8 Feb 12 2014 21:07:12
%S A212149 0,0,0,1,4,13,34,82,185,403,853,1777,3656,7465,15156,30659,61850,
%T A212149 124548,250456,503158
%N A212149 Number of k-element subsets S of {1,...,n} such that mean(S)<median(S).
%C A212149 Also the number of k-element subsets S of {1,...,n} such that mean(S)>median(S).  A212149(n) = A212140(n)/2.
%t A212149 t[n_, k_] := t[n, k] = Count[Map[Median[#] == Mean[#] &, Subsets[Range[n], {k}]], False]
%t A212149 Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
%t A212149 TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
%t A212149 s[n_] := Sum[t[n, k], {k, 1, n}]
%t A212149 Table[s[n], {n, 1, 20}] (* A212140 *)
%t A212149 %/2                     (* A212149 *)
%t A212149 (* _Peter J. C. Moses_, May 01 2012 *)
%Y A212149 Cf. A212139, A212140.
%K A212149 nonn
%O A212149 1,5
%A A212149 _Clark Kimberling_, May 06 2012