OFFSET
1,2
COMMENTS
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1275 (rows 1..50)
Paul Barry, A Riordan array family for some integrable lattice models, arXiv:2409.09547 [math.CO], 2024. See p. 7.
FORMULA
T(n,k) = 1 + Sum_{j=1..n-k} binomial(2*j+k-2, j). - Andrew Howroyd, Apr 09 2023
EXAMPLE
Triangle begins:
1
2 1
5 3 1
15 9 4 1
50 29 14 5 1
176 99 49 20 6 1
638 351 175 76 27 7 1
2354 1275 637 286 111 35 8 1
8789 4707 2353 1078 441 155 44 9 1
Row n = 4 counts the following subsets:
{1,7} {2,6} {3,5} {4}
{1,4,5} {2,4,5} {3,4,5}
{1,4,6} {2,4,6} {3,4,6}
{1,4,7} {2,4,7} {3,4,7}
{1,2,6,7} {2,3,5,6}
{1,3,5,6} {2,3,5,7}
{1,3,5,7} {2,3,4,5,6}
{1,2,4,5,6} {2,3,4,5,7}
{1,2,4,5,7} {2,3,4,6,7}
{1,2,4,6,7}
{1,3,4,5,6}
{1,3,4,5,7}
{1,3,4,6,7}
{1,2,3,5,6,7}
{1,2,3,4,5,6,7}
MATHEMATICA
Table[Length[Select[Subsets[Range[2n-1]], Min@@#==k&&Median[#]==n&]], {n, 6}, {k, n}]
PROG
(PARI) T(n, k) = sum(j=0, n-k, binomial(2*j+k-2, j)) \\ Andrew Howroyd, Apr 09 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gus Wiseman, Mar 23 2023
STATUS
approved