A224542 Number of doubly-surjective functions f:[n]->[4].
2520, 30240, 226800, 1367520, 7271880, 35692800, 165957792, 742822080, 3234711480, 13803744864, 58021888080, 241116750624, 993313349544, 4064913201216, 16549636147968, 67112688842496, 271323921459096, 1094303232174240, 4405390451382960, 17709538489849440
Offset: 8
Examples
a(9) = 30240 since there are 30240 ways to distribute 9 different toys to 4 children so that each child gets at least 2 toys. One child must get 3 toys and the other children get 2 toys each. There are 4 ways to pick the lucky kid. There are C(9,3) ways to choose the 3 toys for the lucky kid. There are 6!/(2!)^3 ways to distribute the remaining 6 toys among the 3 kids. We obtain 4*C(9,3)*6!/8=30240.
Links
- Dennis Walsh, Notes on doubly-surjective finite functions
Programs
-
Maple
seq(eval(diff((exp(x)-x-1)^4,x$n),x=0),n=8..40);
-
Mathematica
nn=27; Drop[Range[0,nn]! CoefficientList[Series[(Exp[x]-x-1)^4, {x,0,nn}], x], 8] (* Geoffrey Critzer, Sep 28 2013 *)
-
PARI
my(x='x+O('x^66)); Vec(serlaplace((exp(x)-x-1)^4)) /* Joerg Arndt, Apr 10 2013 */
Formula
a(n) = 4^n-4*3^n-4*n*3^(n-1)+(9*n+3*n^2)*2^(n-1)+6*2^n-4-8*n-4*n^3;
a(n) = sum(n!/(i!*j!*k!*m!)) over such that i,j,k, and m are all at least 2 and i+j+k+m=n.
E.g.f.: (exp(x)-x-1)^4.
a(n) = 24*A058844(n). - Alois P. Heinz, Apr 10 2013
G.f.: 24*x^8*(288*x^6-1560*x^5+3500*x^4-4130*x^3+2625*x^2-840*x+105) / ((x-1)^4*(2*x-1)^3*(3*x-1)^2*(4*x-1)). - Colin Barker, Jun 04 2013
Comments