[go: up one dir, main page]

login
Revision History for A246522 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number A(n,k) of endofunctions on [n] whose cycle lengths are divisors of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.
(history; published version)
#24 by Michael De Vlieger at Wed Nov 22 08:16:44 EST 2023
STATUS

reviewed

approved

#23 by Stefano Spezia at Wed Nov 22 07:59:09 EST 2023
STATUS

proposed

reviewed

#22 by Jean-François Alcover at Wed Nov 22 05:47:13 EST 2023
STATUS

editing

proposed

#21 by Jean-François Alcover at Wed Nov 22 05:47:06 EST 2023
MATHEMATICA

multinomial[n_, k_List] := n!/Times @@ (k!);

Unprotect[Power]; 0^0 = 1; Protect[Power];

b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[multinomial[n, Join[{n - i*j}, Table[i, {j}]]]/j!*b[n - i*j, i-1, k]*(i-1)!^j, {j, 0, If[Mod[k, i] == 0, n/i, 0]}]]];

A[n_, k_] := Sum[b[j, Min[k, j], k]*n^(n-j)*Binomial[n-1, j-1], {j, 0, n}];

Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Nov 22 2023, from 2nd Maple program *)

STATUS

approved

editing

#20 by Alois P. Heinz at Sun May 01 14:02:00 EDT 2022
STATUS

proposed

approved

#19 by Jean-François Alcover at Sun May 01 05:40:20 EDT 2022
STATUS

editing

proposed

#18 by Jean-François Alcover at Sun May 01 05:39:56 EDT 2022
MATHEMATICA

egf[k_] := Exp[Sum[(-ProductLog[-x])^d/d, {d, Divisors[k]}]];

A[1, 0] = 0; A[0, _] = 1; A[1, _] = 1; A[_, 0] = 0;

A[n_, k_] := n!*SeriesCoefficient[egf[k], {x, 0, n}];

egf[k_] := Exp[Sum[(-ProductLog[-x])^d/d, {d, Divisors[k]}]]; A[1, 0] = 0; A[0, _] = 1; A[1, _] = 1; A[_, 0] = 0; A[n_, k_] := n!*SeriesCoefficient[egf[k], {x, 0, n}]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 04 2014, translated from first Maple program *)

STATUS

approved

editing

Discussion
Sun May 01
05:40
Jean-François Alcover: Minor edit of Mma code
#17 by Alois P. Heinz at Sun Feb 24 11:16:33 EST 2019
STATUS

editing

approved

#16 by Alois P. Heinz at Sun Feb 24 11:02:13 EST 2019
EXAMPLE

1, 1, 1, 1, 1, 1, 1, ...

0, 1, 1, 1, 1, 1, 1, ...

0, 3, 4, 3, 4, 3, 4, ...

0, 16, 25, 18, 25, 16, 27, ...

0, 125, 218, 157, 224, 125, 250, ...

0, 1296, 2451, 1776, 2601, 1320, 2951, ...

0, 16807, 33832, 24687, 37072, 17671, 42552, ...

STATUS

approved

editing

#15 by Alois P. Heinz at Thu Dec 04 07:26:06 EST 2014
STATUS

proposed

approved