%I #13 Jul 24 2014 08:23:35
%S 1,1,4,24,208,2325,31956,520723,9812160,209843145,5020469200,
%T 132844628411,3851705048016,121428210575581,4135403154270584,
%U 151297710936948675,5917989635505922816,246444213949305536017,10885732208011517726880,508350675616737391265563
%N Number of endofunctions on [n] such that no element has a preimage of cardinality three.
%H Alois P. Heinz, <a href="/A245407/b245407.txt">Table of n, a(n) for n = 0..200</a>
%F a(n) = n! * [x^n] (exp(x)-x^3/3!)^n.
%F a(n) ~ c * d^n * n^n / exp(n), where d = 2.52566039645910026750819504865..., c = 1.031458655073968039932844239... . - _Vaclav Kotesovec_, Jul 24 2014
%p b:= proc(n, i) option remember; `if`(n=0 and i=0, 1, `if`(i<1, 0,
%p add(`if`(j=3, 0, b(n-j, i-1) *binomial(n, j)), j=0..n)))
%p end:
%p a:= n-> b(n$2):
%p seq(a(n), n=0..25);
%t Table[n!*SeriesCoefficient[(E^x-x^3/6)^n,{x,0,n}],{n,0,20}] (* _Vaclav Kotesovec_, Jul 23 2014 *)
%t With[{k=3},Flatten[{1,Table[Sum[Binomial[n,j]*Binomial[n,k*j]*(-1)^j*(n-j)^(n-k*j)*(k*j)!/(k!)^j,{j,0,n/k}],{n,1,20}]}]] (* _Vaclav Kotesovec_, Jul 24 2014 *)
%Y Column k=3 of A245405.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Jul 21 2014
|