OFFSET
1,2
COMMENTS
If each box may contain at most one (possibly nested) box then the Bell numbers (A000110) are obtained, whereas if each box may contain at most two smaller (possibly nested) boxes then A000772 is obtained and if no restriction is placed on the number of (possible nested) boxes that any box may contain then the factorial numbers (A000142) are obtained. Sequence suggested by an earlier submission of Rick L. Shepherd.
LINKS
Letong Hong and Rupert Li, Length-Four Pattern Avoidance in Inversion Sequences, arXiv:2112.15081 [math.CO], 2021.
FORMULA
E.g.f.: exp(G(x) - 1), where G(x) be the function that satisfies 6G'(x) = G(x)^3 + 3G(x) + 2 and G(0) = 1. In this case G'(x) is the exponential generating function giving the number of ways to perform the given task if at most 3 boxes may fail to lie in another box. [Joel B. Lewis, Apr 28 2009]
EXAMPLE
a(3)=6, as seen from these arrangements: 112233, 321123, 311223, 211233, 223113, 113223, where xyyx indicates that box x contains box y, etc.
MATHEMATICA
m = 30; G[_] = 1;
Do[G[x_] = 1 + (1/6) Integrate[G[x]^3 + 3 G[x] + 2, x] + O[x]^m, {m}];
CoefficientList[Exp[G[x] - 1] + O[x]^m, x] Range[0, m - 1]! // Rest (* Jean-François Alcover, Nov 13 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, May 25 2004
EXTENSIONS
a(20) corrected by Jean-François Alcover, Nov 13 2019
STATUS
approved