%I #18 Feb 18 2016 02:36:35
%S 0,2,18,180,2100,28800,458640,8361360,172141200,3954484800,
%T 100330876800,2786980996800,84133667217600,2742770705875200,
%U 96032990237184000,3594185336405664000,143193231131382432000,6050494745192177280000,270263142944131873536000
%N Place n distinguishable balls in n boxes (in n^n ways); let f(n,k) = number of ways that max in any box is k, for 1<=k<=n; sequence gives f(n,2).
%H Alois P. Heinz, <a href="/A019581/b019581.txt">Table of n, a(n) for n = 1..200</a>
%F a(n) = sum(d=1..floor(n/2), n!^2 / ( 2^d * (n-2*d)! * d! * d! ) ).
%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
%p add(b(n-j, i-1)/j!, j=0..min(2, n))))
%p end:
%p a:= n-> n! *(b(n$2) -1):
%p seq(a(n), n=1..30); # _Alois P. Heinz_, Jul 29 2014
%t a[n_] := n! (Hypergeometric2F1[1/2 - n/2, -n/2, 1, 2] - 1); Array[a, 30] (* _Jean-François Alcover_, Feb 18 2016 *)
%o (PARI) a(n) = sum(d=1, n\2, n!^2 / (2^d * (n-2*d)! * d!^2)); \\ _Michel Marcus_, Aug 13 2013
%Y Cf. A019576.
%Y Column k=2 of A019575. - _Alois P. Heinz_, Jul 29 2014
%K nonn,easy
%O 1,2
%A Lee Corbin (lcorbin(AT)tsoft.com), _N. J. A. Sloane_.