OFFSET
1,2
COMMENTS
Row sums: A212146.
EXAMPLE
First 7 rows:
1
2...1
3...3....1
4...6....2...1
5...10...4...3....1
6...15...6...7....2...1
7...21...9...13...5...3...1
T(5,3) counts these subsets: {1,2,3}, {1,3,5}, {2,3,4}, {3,4,5}.
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}]]
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,tabl
AUTHOR
Clark Kimberling, May 06 2012
STATUS
approved