%I #34 Sep 26 2023 06:28:55
%S 1,2,14,222,6384,291720,19445040,1781750880,214899027840,
%T 33007837322880,6290830003852800,1456812592995513600,
%U 402910665227270323200,131173228963370155161600,49656810289225281849907200,21628258853895305337293568000,10739534026001485514941587456000
%N Number of ways to use the elements of {1,...,k}, 0 <= k <= 2n, once each to form a sequence of n sets, each having 1 or 2 elements.
%C Equivalently, number of sequences of n labeled items such that each item occurs just once or twice. - _David Applegate_, Dec 08 2008
%C Also, number of assembly trees for a certain star graph, see Vince-Bona, Theorem 4. - _N. J. A. Sloane_, Oct 08 2012
%H Alois P. Heinz, <a href="/A105749/b105749.txt">Table of n, a(n) for n = 0..100</a>
%H R. A. Proctor, <a href="https://arxiv.org/abs/math/0606404">Let's Expand Rota's Twelvefold Way for Counting Partitions!</a>, arXiv:math/0606404 [math.CO], 2006-2007.
%H Andrew Vince and Miklos Bona, <a href="http://arxiv.org/abs/1204.3842">The Number of Ways to Assemble a Graph</a>, arXiv preprint arXiv:1204.3842 [math.CO], 2012.
%H <a href="/index/Par#partN">Index entries for related partition-counting sequences</a>
%F a(n) = Sum_{k=0..n} C(n,k) * (n+k)! / 2^k.
%F a(n) = n! * A001515(n).
%F A003011(n) = Sum_{k=0..n} C(n, k)*a(k).
%F a(n) = Gamma(n+1)*Hypergeometric2F0([-n, n+1], [], -1/2). - _Peter Luschny_, Jul 29 2014
%F a(n) ~ sqrt(Pi) * 2^(n + 1) * n^(2*n + 1/2) / exp(2*n - 1). - _Vaclav Kotesovec_, Nov 27 2017
%F From _G. C. Greubel_, Sep 26 2023: (Start)
%F a(n) = n*(2*n-1)*a(n-1) + n*(n-1)*a(n-2).
%F a(n) = e * sqrt(2/Pi) * n! * BesselK(n+1/2, 1).
%F a(n) = ((2*n)!/2^n) * Hypergeometric1F1(-n, -2*n, 2).
%F G.f.: (-2/x) * Integrate_{t=0..oo} exp(-t)/((t+1)^2 - 1 - 2/x) dt.
%F G.f.: e*( exp(-sqrt(1 + 2/x)) * ExpIntegralEi(-1 + sqrt(1 + 2/x)) - exp(sqrt(1 + 2/x)) * ExpIntegralEi(-1 - sqrt(1 + 2/x)) )/sqrt(x^2 + 2*x).
%F E.g.f.: ((1-x)/x) * Hypergeometric1F1(1, 3/2, -(1-x)^2/(2*x)).
%F E.g.f.: (1/(1-x))*Hypergeometric2F0([1, 1/2]; []; 2*x/(1-x)^2). (End)
%e a(2) = 14 = |{ ({1},{2}), ({2},{1}), ({1},{2,3}), ({2,3},{1}), ({2},{1,3}), ({1,3},{2}), ({3},{1,2}), ({1,2},{3}), ({1,2},{3,4}), ({3,4},{1,2}), ({1,3},{2,4}), ({2,4},{1,3}), ({1,4},{2,3}), ({2,3},{1,4}) }|.
%p a:= n-> add(binomial(n, k)*(n+k)!/2^k, k=0..n):
%p seq(a(n), n=0..20); # _Alois P. Heinz_, Jul 21 2012
%t f[n_]:= Sum[Binomial[n,k]*(n+k)!/2^k, {k,0,n}]; Table[f[n], {n,0,20}]
%o (Magma) [(&+[Binomial(n,j)*Factorial(n+j)/2^j: j in [0..n]]): n in [0..30]]; // _G. C. Greubel_, Sep 26 2023
%o (SageMath) [sum(binomial(n,j)*factorial(n+j)//2^j for j in range(n+1)) for n in range(31)] # _G. C. Greubel_, Sep 26 2023
%Y Cf. A001515, A003011, A143990.
%Y Replace "sets" by "lists": A099022.
%Y Column n=2 of A181731.
%K nonn,easy
%O 0,2
%A Robert A. Proctor (www.math.unc.edu/Faculty/rap/), Apr 18 2005
%E More terms from _Robert G. Wilson v_, Apr 23 2005