OFFSET
0,2
COMMENTS
From Emanuele Munarini, May 16 2014: (Start)
a(n) is the number of partitions of an n-set where each block consists of one or two elements, and each block is endowed with a permutation or a linear order.
For instance, for n = 2, we have the following partitions of the set {1,2}:
(1)(2), (1)[2], [1](2), [1][2], (12), [12], [21] where parenthesis denote blocks consisting of cycles, and square brackets denote blocks consisting of linear orders. (End)
FORMULA
a(n) = Sum_{k=0..floor(n/2)} 2^(n-3*k)*3^k * n!/((n-2*k)!*k!).
O.g.f.: 1/(1-2*x - 3*x^2/(1-2*x - 6*x^2/(1-2*x - 9*x^2/(1-2*x - 12*x^2/(1-2*x -...))))), (continued fraction).
E.g.f.: exp((4*x+3*x^2)/2) = G(0); G(k) = 1+(4*x+3*x^2)/(4*k+2-(4*x+3*x^2)*(4*k+2)/(4*x+3*x^2+4*(k+1)/G(k+1))) ; (continued fraction). - Sergei N. Gladkovskii, Dec 28 2011
a(n) = 2*a(n-1) + 3*(n-1)*a(n-2), a(0)=1, a(1)=2. - Sergei N. Gladkovskii, Jul 29 2012
a(n) ~ exp((2/3)*sqrt(3*n) - n/2 - 1/3)*3^(n/2)*n^(n/2)/sqrt(2)*(1 + (11/54)*sqrt(3)/sqrt(n)). - Vaclav Kotesovec, Oct 20 2012
a(n) = Sum_{k=0..n} s(n,k)*(-1)^(n-k)*(3^n/2^(n-k))*B(k,2/3), where the s(n,k) are the (signless) Stirling numbers of the first kind and the B(n,x) = Sum_{k=0..n} S(n,k)*x^k are the Stirling polynomials (or exponential polynomials), where the S(n,k) are the Stirling numbers of the second kind. - Emanuele Munarini, May 15 2014
a(n) = i^(1-n)*2^((1+n)/2)*3^((n-1)/2)*U((1-n)/2, 3/2, -2/3), U Kummer's hypergeometric function of the second kind. - Peter Luschny, May 15 2014
EXAMPLE
E.g.f.: A(x) = 1 + 2*x + 7*x^2/2! + 26*x^3/3! + 115*x^4/4! + 542*x^5/5! + ...
MAPLE
a := n -> I^(1-n)*2^((1+n)/2)*3^((n-1)/2)*KummerU((1-n)/2, 3/2, -2/3);
seq(round(evalf(a(n), 32)), n=0..23); # Peter Luschny, May 15 2014
MATHEMATICA
CoefficientList[Series[E^(2*x+3*x^2/2), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 20 2012 *)
a[n_] := Sum[StirlingS1[n, k]*3^n/2^(n - k) BellB[k, 2/3], {k, 0, n}]; Table[a[n], {n, 0, 12}] (* Emanuele Munarini, May 15 2014 *)
PROG
(PARI) {a(n)=n!*polcoeff(exp(2*x+3*x^2/2+x*O(x^n)), n)}
(PARI) {a(n)=sum(k=0, n\2, 2^(n-3*k)*3^k*n!/((n-2*k)!*k!))}
(PARI) /* O.g.f. as a continued fraction: */
{a(n)=local(CF=1+2*x+x*O(x^n)); for(k=1, n-1, CF=1/(1-2*x-3*(n-k)*x^2*CF)); polcoeff(CF, n)}
(Maxima) B(n, x) := sum(stirling2(n, k)*x^k, k, 0, n);
a(n) := sum(stirling1(n, k)*3^n/2^(n-k)*B(k, 2/3), k, 0, n);
makelist(a(n), n, 0, 40); /* Emanuele Munarini, May 15 2014 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Dec 25 2011
STATUS
approved