OFFSET
0,4
COMMENTS
The number of surjective functions f:{1,2,...,n}->{1,2,3} with a designated pre-image of 1, 2, and 3.
LINKS
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 748
Index entries for linear recurrences with constant coefficients, signature (12,-54,108,-81).
FORMULA
E.g.f.: x^3*exp(x)^3
Recurrence: {a(1)=0, a(2)=0, a(3)=6, (-3*n-3)*a(n)+(-2+n)*a(n+1)}.
a(n) = n!*sum(i+j+k=n, ijk/(i!j!k!)) - Benoit Cloitre, Nov 11 2004
G.f.: 6*x^3 / (3*x-1)^4. - Colin Barker, Jun 04 2013
MAPLE
spec := [S, {B=Set(Z), S=Prod(Z, Z, Z, B, B, B)}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
Range[0, 20]! CoefficientList[Series[(x Exp[x])^3, {x, 0, 20}], x]
LinearRecurrence[{12, -54, 108, -81}, {0, 0, 0, 6}, 30] (* Harvey P. Dale, Sep 02 2022 *)
PROG
(PARI) a(n)=3^(n-3)*n*(n-1)*(n-2); /* Joerg Arndt, Sep 16 2012 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
Edited by N. J. A. Sloane, Dec 24 2010
STATUS
approved