A233744 Numbers p = a(n) such that p divided by (n-1)! is equal to the average number of elements of partition sets of n elements excluding sets with a singleton.
1, 2, 8, 36, 200, 1300, 9720, 82180, 775520, 8082180, 92205800, 1143084580, 15302486160, 220019440420, 3381685263320, 55333244924100, 960361672886720, 17622501030879940, 340893902373527880, 6933456765092580580, 147919915357498809200, 3303011756746128625380
Offset: 2
Examples
For example, if, among 5 players A,B,C,D,E, A takes C and C takes B and B takes A, one loop would be ACB and the other loop would be DE. No single element loop is allowed. For n = 2, the only possible loop is a 2 elements loop AB ==> a(2) = 1. for n = 3, the only possible loop is a 3 elements loop ABC or ACB ==> a(3) = 2 as a(3) / 2! = 1. for n = 4, there are two types of loop, the ABCD loop and AB + CD loops, there is 2 chances out of 3 to get the ABCD type loop and 1 chance out of 3 to get the "AB + CD" configuration. The average number of loop is therefore 2/3 X 1 + 1/3 X 2 = 4/3 = 8 / 6 = a(4)/3!. for n = 5, there are two types of loop, the ABCDE loop and ABC + DE loops, there is 2 chances out of 4 to get the ABCDE type loop and 2 chance out of 4 to get the "ABC + DE" configuration. The average number of loop is therefore 2/4 X 1 + 2/4 X 2 = 6/4 = 36 / 24 = a(5)/4!.
Links
- Martin Y. Champel, Table of n, a(n) for n = 2..99
Programs
-
Mathematica
S[1] = 1; S[n_] := S[n] = 1 + 1/(n-1) (S /@ Range[2, n-2] // Total); a[n_] := (n-1)! S[n]; a /@ Range[2, 99] (* Jean-François Alcover, Sep 19 2020 *)
-
PARI
S(n)=if(n<2,1,1+sum(i=2,n-2,S(i))/(n-1)); a(n)=(n-1)!*S(n) \\ Ralf Stephan, Dec 17 2013
-
Python
from sympy import factorial, Integer angel=[0,0,1,1] A233744=[1,2] n = 20 for i in range(4,n): new = 1+sum(angel[:-1])/Integer(i-1) angel.append(new) A233744.append(new*factorial(i-1)) print(A233744)
Formula
a(n) = (n-1)! * S(n), with S(n) = 1 + 1/(n-1) * sum of previous S(i) with i in (2, n-2).
Extensions
More terms from Ralf Stephan, Dec 17 2013
Comments