A331500 a(n) = A302112(n) * n! * 2^n.
1, 2, 120, 20880, 7244160, 4193683200, 3648171985920, 4450790792448000, 7251098441261875200, 15208619045076276019200, 39919072914444753469440000, 128188338317208930555828633600, 494389344738688341547326898176000, 2255096937522349816552823932846080000
Offset: 0
Keywords
Examples
If n = 1 a(n) = 2, a(n)/(2*n)^(2*n) = 1/2. If we toss two coins we obtain one of the four ordered pairs: (H,H), (H,T), (T,H), or (T,T). The probability of a forest is 1/2, and the expected value of trials until a forest is 2.
Links
- Washington Bomfim, Experimental expected values
- P. Flajolet, D. E. Knuth, and B. Pittel, The first cycles in an evolving graph, Discrete Mathematics, 75(1-3):167-215, 1989.
- George Havas and Bohdan S. Majewski, Optimal algorithms for minimal perfect hashing
Programs
-
Maple
T:= proc(n, m) option remember; `if`(n<0, 0, `if`(n=m, 1, `if`(m<1 or m>n, 0, add(binomial(n-1, j-1)*j^(j-2)* T(n-j, m-1), j=1..n-m+1)))) end: a:= n-> T(2*n, n)*n!*2^n: seq(a(n), n=0..14); # Alois P. Heinz, Jun 24 2021
-
Mathematica
Array[(-1)^#*HypergeometricPFQ[{1 - 2 #, -#}, {1, -2 #}, 4 #]*(2 #)! &, 7] (* Michael De Vlieger, Feb 07 2020, after Vaclav Kotesovec at A302112 *)
-
PARI
A302112(n) = { \\ From Jon E. Schoenfield's formula in A302112. sum(j = 0, n, (-1/2)^j * binomial(n, j) * binomial(2*n-1, n+j-1) * (2*n)^(n-j) * (n+j)!) / n! }; a(n) = A302112(n) * n! * 2^n;
Extensions
Edited by Washington Bomfim, Jun 14 2021
Comments