A066166 Stanley's children's game. Class of n (named) children forms into rings with exactly one child inside each ring. We allow the case when outer ring has only one child. a(n) gives number of possibilities, including clockwise order (or which hand is held), in each ring.
2, 3, 20, 90, 594, 4200, 34544, 316008, 3207240, 35699400, 432690312, 5672581200, 79991160144, 1207367605080, 19423062612480, 331770360922560, 5997105160795584, 114373526841360000, 2295170834453089920
Offset: 2
Examples
a(4)=20: 12 ways to make 2 hugs, 8 ways to make a 3-ring.
References
- R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999 (Sec. 5.2)
Links
- Harvey P. Dale, Table of n, a(n) for n = 2..250
- Steven Finch, Rounds, Color, Parity, Squares, arXiv:2111.14487 [math.CO], 2021.
- P. Flajolet, S. Gerhold and B. Salvy, On the non-holonomic character of logarithms, powers and the n-th prime function, arXiv:math/0501379 [math.CO], 2005.
Programs
-
Magma
m:=30; R
:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!(-1+1/(1-x)^x)); [Factorial(n+1)*b[n]: n in [1..m-2]]; // G. C. Greubel, Aug 29 2018 -
Mathematica
Drop[With[{nn=20},CoefficientList[Series[1/(1-x)^x-1,{x,0,nn}],x] Range[ 0,nn]!],2] (* Harvey P. Dale, Sep 17 2011 *)
-
Maxima
b(n):=if n=0 then 1 else (n-1)!*sum((1+1/i)*b(n-i-1)/(n-i-1)!,i,1,n-1); makelist(a(n),n,2,10); /* Vladimir Kruchinin, Feb 25 2015 */
-
PARI
a(n)=if(n<0,0,n!*polcoeff(-1+1/(1-x+x*O(x^n))^x,n))
-
PARI
{a(n) = n!*polcoeff( sum(m=1,n, x^m/m! * prod(k=0,m-1,x + k) +x*O(x^n) ), n)} for(n=2,20, print1(a(n),", ")) \\ Paul D. Hanna, Oct 26 2015
-
PARI
a(n) = n!*sum(k=0, n\2, abs(stirling(n-k, k, 1))/(n-k)!); \\ Seiichi Manyama, May 10 2022
Formula
E.g.f.: -1+1/(1-x)^x.
a(n) ~ n! * (1 - 1/n + (1-log(n)-gamma)/n^2), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Apr 21 2014
a(n) = b(n), n>0, a(0)=0, where b(n) = (n-1)!*Sum_{i=1..n-1} (1+1/i)*b(n-i-1)/(n-i-1)!, b(0)=1. - Vladimir Kruchinin, Feb 25 2015
E.g.f.: Sum_{n>=1} x^n/n! * Product_{k=0..n-1} (k + x). - Paul D. Hanna, Oct 26 2015
a(n) = n! * Sum_{k=0..floor(n/2)} |Stirling1(n-k,k)|/(n-k)!. - Seiichi Manyama, May 10 2022
Comments