login
A327559
Twice the median of {Stirling2(n, k), k = 0..n}.
1
1, 2, 2, 2, 11, 30, 84, 254, 717, 1500, 13035, 44550, 300950, 1505504, 3854579, 14283372, 83480149, 251709276, 3136016690, 12605049160, 162391467080, 691231886400, 3678703702014, 23362113269002, 94834621131920, 374452713892530, 4019520663745860, 15252585773825400
OFFSET
1,2
COMMENTS
"Twice" is included in the definition to handle half-integer medians.
LINKS
EXAMPLE
For n = 6, {Stirling2(6, k), k = 0..6} = {0, 1, 31, 90, 65, 15, 1}, so we have 3 elements {0, 1, 1} that are < 15, and 3 elements {31, 90, 65} that are > 15. Hence, 15 is the median, and a(6) = 2*15 = 30.
MAPLE
a:= n->(l->l[floor(1+n/2)]+l[ceil(1+n/2)])(sort([seq(Stirling2(n, j), j=0..n)])):
seq(a(n), n=1..30); # Alois P. Heinz, Sep 16 2019
MATHEMATICA
Table[2 Median[Table[StirlingS2[n, k], {k, 0, n}]], {n, 1, 30}]
PROG
(PARI) a(n)={my(t=vecsort(vector(n+1, k, stirling(n, k-1, 2)))); t[n\2+1] + t[n-n\2+1]} \\ Andrew Howroyd, Sep 16 2019
CROSSREFS
Sequence in context: A068971 A019233 A121223 * A139518 A335986 A096855
KEYWORD
nonn,easy
AUTHOR
STATUS
approved