A178682 The number of functions f:{1,2,...,n}->{1,2,...,n} such that the number of elements that are mapped to m is divisible by m.
1, 1, 2, 5, 13, 42, 150, 576, 2266, 9966, 47466, 237019, 1224703, 6429152, 35842344, 212946552, 1325810173, 8488092454, 55276544436, 362961569008, 2465240278980, 17538501945077, 130454679958312, 1002493810175093, 7838007702606372, 61789072382062638
Offset: 0
Examples
a(3) = 5 because there are 5 such functions: (1,1,1), (1,2,2), (2,1,2), (2,2,1), (3,3,3). G.f. = 1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 42*x^5 + 150*x^6 + 576*x^7 + ...
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..680
Crossrefs
Programs
-
Magma
m:=25; R
:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (&*[(&+[x^(k*j)/Factorial(k*j): k in [0..m]]): j in [1..m]]) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Jan 26 2019 -
Maple
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(b(n-i*j, i-1)*binomial(n, i*j), j=0..n/i))) end: a:= n-> b(n$2): seq(a(n), n=0..30); # Alois P. Heinz, Aug 30 2015
-
Mathematica
Range[0,20]! CoefficientList[Series[Product[Sum[x^(j i)/(j i)!,{i,0,20}],{j,1,20}],{x,0,20}],x]
-
PARI
m=30; my(x='x+O('x^m)); Vec(serlaplace(prod(j=1, m, sum(k=0,m, x^(k*j)/(k*j)!)))) \\ G. C. Greubel, Jan 26 2019
-
Sage
m = 30; T = taylor(product(sum(x^(k*j)/factorial(k*j) for k in (0..m)) for j in (1..m)), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, Jan 26 2019
Formula
E.g.f.: Product_{j>=1} Sum_{i>=0} x^(j*i)/(j*i)!.
Extensions
a(21)-a(25) from Alois P. Heinz, Aug 30 2015
Comments