OFFSET
4,4
COMMENTS
In case the maximum should turn out not to be unique, use the smallest value. - N. J. A. Sloane, Apr 22 2017
LINKS
Robert Davis, Sarah A. Nelson, T. Kyle Petersen, Bridget E. Tenner, The pinnacle set of a permutation, arXiv:1704.05494 [math.CO], 2017.
MAPLE
f:= n -> max[index]([seq(d!*(d+1)!*2^(n-2*d-1)*Stirling2(n-d, d+1), d=1..n/2)]):
map(f, [$4..200]); # Robert Israel, Apr 20 2017
MATHEMATICA
a[n_] := MaximalBy[Table[{d, d! (d+1)! 2^(n-2d-1) StirlingS2[n-d, d+1]}, {d, 1, n/2}], Last][[All, 1]] // Min;
Table[a[n], {n, 4, 78}] (* Jean-François Alcover, Sep 18 2018 *)
PROG
(PARI) half(n) = if (n % 2, n\2, n/2 - 1);
a(n) = {v = vector(half(n), d, d!*(d + 1)!*(2^(n-2*d-1)*stirling(n-d, d+1, 2))); w = vecsort(v, , 1); w[#w]; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Apr 20 2017
STATUS
approved