OFFSET
1,2
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..250
FORMULA
a(n) = Numerator( 1/(n-1)! * Sum_{i=1..n} A132393(n,i)/i ). - Alois P. Heinz, Nov 23 2013
EXAMPLE
Expectations for n=1,... are 1/1, 3/2, 23/12, 55/24, 1901/720, 4277/1440, 198721/60480, 16083/4480, ... = A232193/A232248
For n=3 there are 6 permutations. We have probability 1/6 of selecting (1)(2)(3) and the cycle size is 1. We have probability 3/6 of selecting a permutation with cycle type (1)(23) and (on average) the cycle length is 3/2. We have probability 2/6 of selecting a permutation of the form (123) and the cycle size is 3. 1/6*1 + 3/6*3/2 + 2/6*3 = 23/12.
MAPLE
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
expand(add(multinomial(n, n-i*j, i$j)/j!*(i-1)!^j
*b(n-i*j, i-1) *x^j, j=0..n/i))))
end:
a:= n->numer((p->add(coeff(p, x, i)/i, i=1..n))(b(n$2))/(n-1)!):
seq(a(n), n=1..30); # Alois P. Heinz, Nov 21 2013
# second Maple program:
a:= n-> numer(add(abs(combinat[stirling1](n, i))/i, i=1..n)/(n-1)!):
seq(a(n), n=1..30); # Alois P. Heinz, Nov 23 2013
MATHEMATICA
Table[Numerator[Total[Map[Total[#]!/Product[#[[i]], {i, 1, Length[#]}]/Apply[Times, Table[Count[#, k]!, {k, 1, Max[#]}]]/(Total[#]-1)!/Length[#]&, Partitions[n]]]], {n, 1, 25}]
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Geoffrey Critzer, Nov 20 2013
STATUS
approved