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.
%I A212140 #7 Feb 12 2014 20:38:25 %S A212140 0,0,0,2,8,26,68,164,370,806,1706,3554,7312,14930,30312,61318,123700, %T A212140 249096,500912,1006316 %N A212140 Number of k-element subsets S of {1,...,n} such that mean(S) is not equal to median(S). %C A212140 Row sums of the triangular array at A212148. %t A212140 t[n_, k_] := t[n, k] = Count[Map[Median[#] == Mean[#] &, Subsets[Range[n], {k}]], False] %t A212140 Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]] %t A212140 TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]] %t A212140 s[n_] := Sum[t[n, k], {k, 1, n}] %t A212140 Table[s[n], {n, 1, 20}] (* A212140 *) %t A212140 %/2 (* A212149 *) %t A212140 (* _Peter J. C. Moses_, May 01 2012 *) %Y A212140 Cf. A212148, A212149. %K A212140 nonn %O A212140 1,4 %A A212140 _Clark Kimberling_, May 06 2012