%I #30 Jan 25 2020 20:56:31
%S 1,0,2,3,40,205,2556,24409,347712,4794633,81163900,1434596581,
%T 28725779952,612610306477,14280306222924,354958921699425,
%U 9471543095892736,268347925179992593,8075532017006497404,256672899448317943453,8603440900030816095600
%N Number of endofunctions on [n] such that no element has a preimage of cardinality one.
%H Alois P. Heinz and Vaclav Kotesovec, <a href="/A231797/b231797.txt">Table of n, a(n) for n = 0..410</a> (first 180 terms from Alois P. Heinz)
%H R. K. Guy, <a href="/A241580/a241580_1.pdf">Letter to N. J. A. Sloane, Jun 21, 1975</a>
%F a(n) = n! * [x^n] (exp(x)-x)^n.
%F a(n) ~ (1-exp(-1))^(n+1/2) * n^n. - _Vaclav Kotesovec_, Jul 23 2014
%F E.g.f.: 1 / ((1 + x) * (1 + LambertW(-x/(1 + x)))). - _Ilya Gutkovskiy_, Jan 25 2020
%e a(2) = 2: (1,1), (2,2).
%e a(3) = 3: (1,1,1), (2,2,2), (3,3,3).
%p with(combinat):
%p b:= proc(t, i, u) option remember; `if`(t=0, 1,
%p `if`(i<2, 0, b(t, i-1, u) +add(multinomial(t, t-i*j, i$j)
%p *b(t-i*j, i-1, u-j)*u!/(u-j)!/j!, j=1..t/i)))
%p end:
%p a:= n-> b(n$3):
%p seq(a(n), n=0..25);
%t multinomial[n_, k_List] := n!/Times @@ (k!); b[t_, i_, u_] := b[t, i, u] = If[t == 0, 1, If[i < 2, 0, b[t, i - 1, u] + Sum[multinomial[t, Join[{ t - i*j}, Array[i &, j]]] * b[t - i*j, i - 1, u - j]*u!/(u - j)!/j!, {j, 1, t/i}]]]; a[n_] := b[n, n, n]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Dec 27 2013, translated from Maple *)
%t Table[n!*SeriesCoefficient[(E^x-x)^n,{x,0,n}],{n,0,20}] (* _Vaclav Kotesovec_, Jul 23 2014 *)
%t Flatten[{1,Table[(-1)^n*n! + Sum[Binomial[n,j]^2*(-1)^j*(n-j)^(n-j)*j!,{j,0,n-1}],{n,1,20}]}] (* _Vaclav Kotesovec_, Jul 25 2014 *)
%o (PARI) {a(n) = n! * polcoeff((exp(x + x*O(x^n)) - x)^n, n)}
%o for(n=0, 30, print1(a(n), ", ")) \\ _Vaclav Kotesovec_, Jan 30 2015
%Y Column k=0 of A206823.
%Y A diagonal of A241580. Cf. also A241581.
%Y Column k=1 of A245405.
%Y Cf. A245496.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Nov 13 2013