OFFSET
1,2
LINKS
Hiroaki Yamanouchi, Table of n, a(n) for n = 1..100
MATHEMATICA
t[n_, k_] := t[n, k] = Count[Map[Median[#] == Mean[#] &, Subsets[Range[n], {k}]], True]
Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]] (* A212139 *)
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, 22}] (* A212146 *)
(% - 1)/2 (* A212147 *)
(* Peter J. C. Moses, May 01 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 06 2012
EXTENSIONS
a(23) from Alois P. Heinz, Feb 12 2014
a(24)-a(37) from Hiroaki Yamanouchi, Oct 03 2014
STATUS
approved