OFFSET
0,3
COMMENTS
Previous name was: A simple grammar.
For n>=2, a(n) is the number of ways to partition {1,2,...,n} into any number of blocks. Then partition each block into exactly 2 sub-blocks. Then form ordered pairs by permuting the elements within each pair of sub-blocks. - Geoffrey Critzer, Jun 13 2020
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..433
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 860
FORMULA
E.g.f.: exp(x^2/(1 - x)^2).
Recurrence: a(0) = 1, a(1) = 0, a(2) = 2, and for n >= 2, (-n^3-2*n-3*n^2)*a(n) +(3*n^2+7*n+2)*a(n+1) + (-6-3*n)*a(n+2) + a(n+3) = 0.
a(n) = Sum_{k=0..floor(n/2)} n!/k!*binomial(n-1, 2*k-1). - Vladeta Jovovic, Sep 13 2003
a(n) ~ 2^(1/6)* n^(n-1/6) * exp(1/3 - (n/2)^(1/3) + 3*(n/2)^(2/3) - n)/sqrt(3) * (1 - 14*2^(-2/3)/(27*n^(1/3)) - 1688*2^(-4/3)/(3645*n^(2/3))). - Vaclav Kotesovec, Oct 01 2013
a(n) = n!*y(n) with y(0) = 1 and y(n) = Sum_{k=0..n-1} (n-k)*(n-k-1)*y(k)/n for n >= 1. - Benedict W. J. Irwin, Jun 02 2016
EXAMPLE
a(3) = 12 because we have the 6 ordered pairs: ({1},{2,3}), ({1},{3,2}), ({2},{1,3}), ({2},{3,1}), ({3},{1,2}), ({3},{2,1}) and their reflections. - Geoffrey Critzer, Jun 13 2020
MAPLE
spec := [S, {B=Sequence(Z, 1 <= card), C=Prod(B, B), S= Set(C)}, labeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
nn = 20; a = x/(1 - x); Range[0, nn]! CoefficientList[Series[Exp[ a^2], {x, 0, nn}], x] (* Geoffrey Critzer, Dec 11 2011 *)
PROG
(Maxima) makelist(if n=0 then 1 else sum(n!/k!*binomial(n-1, 2*k-1), k, 0, floor(n/2)), n, 0, 18); \\ Bruno Berselli, May 25 2011
(PARI)
N=33; x='x+O('x^N);
egf=exp(x^2/(1-x)^2);
Vec(serlaplace(egf))
/* Joerg Arndt, Sep 15 2012 */
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
New name using e.g.f. from Vaclav Kotesovec, Oct 01 2013
Formula section edited by Petros Hadjicostas, Jun 12 2020
STATUS
approved