A222029 Triangle of number of functions in a size n set for which the sequence of composition powers ends in a length k cycle.
1, 1, 3, 1, 16, 9, 2, 125, 93, 32, 6, 1296, 1155, 480, 150, 24, 20, 16807, 17025, 7880, 3240, 864, 840, 262144, 292383, 145320, 71610, 24192, 26250, 720, 0, 0, 504, 0, 420, 4782969, 5752131, 3009888, 1692180, 653184, 773920, 46080, 5040, 0, 32256, 0, 26880, 0, 0, 2688
Offset: 0
Examples
T(1,1) = |{[0]}|, T(2,1) = |{[0,0],[0,1],[1,1]}|, T(2,2) = |{[0,1]}|. Triangle starts: 1; 1; 3, 1; 16, 9, 2; 125, 93, 32, 6; 1296, 1155, 480, 150, 24, 20; 16807, 17025, 7880, 3240, 864, 840; 262144, 292383, 145320, 71610, 24192, 26250, 720, 0, 0, 504, 0, 420; ...
Links
- Alois P. Heinz, Rows n = 0..30, flattened
- Chad Brewbaker, Ruby program for A222029
Crossrefs
Programs
-
Maple
b:= proc(n, m) option remember; `if`(n=0, x^m, add((j-1)!* b(n-j, ilcm(m, j))*binomial(n-1, j-1), j=1..n)) end: T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(add( b(j, 1)*n^(n-j)*binomial(n-1, j-1), j=0..n)): seq(T(n), n=0..10); # Alois P. Heinz, Aug 14 2017
-
Mathematica
b[n_, m_]:=b[n, m]=If[n==0, x^m, Sum[(j - 1)!*b[n - j, LCM[m, j]] Binomial[n - 1, j - 1], {j, n}]]; T[n_]:=If[n==0, {1}, Drop[CoefficientList[Sum[b[j, 1]n^(n - j)*Binomial[n - 1, j - 1], {j, 0, n}], x], 1]]; Table[T[n], {n, 0, 10}]//Flatten (* Indranil Ghosh, Aug 17 2017 *)
-
Python
from sympy.core.cache import cacheit from sympy import binomial, Symbol, lcm, factorial as f, Poly, flatten x=Symbol('x') @cacheit def b(n, m): return x**m if n==0 else sum([f(j - 1)*b(n - j, lcm(m, j))*binomial(n - 1, j - 1) for j in range(1, n + 1)]) def T(n): return Poly(sum([b(j, 1)*n**(n - j)*binomial(n - 1, j - 1) for j in range(n + 1)]),x).all_coeffs()[::-1][1:] print([T(n) for n in range(11)]) # Indranil Ghosh, Aug 17 2017
Formula
Extensions
T(0,1)=1 prepended by Alois P. Heinz, Aug 14 2017
Comments