login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224542 Number of doubly-surjective functions f:[n]->[4]. 1
2520, 30240, 226800, 1367520, 7271880, 35692800, 165957792, 742822080, 3234711480, 13803744864, 58021888080, 241116750624, 993313349544, 4064913201216, 16549636147968, 67112688842496, 271323921459096, 1094303232174240, 4405390451382960, 17709538489849440 (list; graph; refs; listen; history; text; internal format)
OFFSET

8,1

COMMENTS

Fourth column of A200091: A200091(n,4)=a(n).

Also, a(n) is (i) the number of length-n words on the alphabet A, B, C, and D with each letter of the alphabet occurring at least twice; (ii) the number of ways to distribute n different toys to 4 children so that each child gets at least two toys; (iii) the number of ways to put n numbered balls into 4 labeled boxes so that each box gets at least two balls; (iv) the number of n-digit positive integers consisting of only digits 1,2,3, and 4 with each of these digits appearing at least twice.

A doubly-surjective function f:D->C is such that the pre-image set f^-1(y) has size at least 2 for each y in C.

Triangle A200091 provides the number of doubly-surjective functions f from a set of size n onto a set of size k. Hence a(n) is column 4 of A200091.

LINKS

Table of n, a(n) for n=8..27.

Dennis Walsh, Notes on doubly-surjective finite functions

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 <i,j,k,m> 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

EXAMPLE

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.

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 *)

PROG

(PARI) x='x+O('x^66); Vec(serlaplace((exp(x)-x-1)^4)) /* Joerg Arndt, Apr 10 2013 */

CROSSREFS

Cf. A224541, A052515.

Sequence in context: A066531 A258540 A159214 * A064592 A179722 A109480

Adjacent sequences:  A224539 A224540 A224541 * A224543 A224544 A224545

KEYWORD

nonn,easy

AUTHOR

Dennis P. Walsh, Apr 09 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 15:06 EDT 2019. Contains 323443 sequences. (Running on oeis4.)