cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

2, 3, 20, 90, 594, 4200, 34544, 316008, 3207240, 35699400, 432690312, 5672581200, 79991160144, 1207367605080, 19423062612480, 331770360922560, 5997105160795584, 114373526841360000, 2295170834453089920
Offset: 2

Views

Author

Len Smiley, Dec 12 2001

Keywords

Comments

Apparently n divides a(n), so a(n)/n = 1, 1, 5, 18, 99, 600, 4318, 35112, 320724, 3245400, 36057526, 436352400, 5713654296, ... - R. J. Mathar, Oct 31 2015

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)

Crossrefs

Cf. A066165. Apart from initial terms and signs, same as A007113.
Cf. A343579.

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