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.
%I A246531 #9 May 01 2022 14:01:24 %S A246531 1,1,4,18,224,1320,42552,262864,12232320,169594560,6117023600, %T A246531 61920993024,8022787347456,56694391376896,5193025319432160, %U A246531 174746314698336000,10338252997184749568,121439552019384139776,26096843176349347142208,262144006402373705728000 %N A246531 Number of endofunctions on [n] whose cycle lengths are divisors of n. %H A246531 Alois P. Heinz, <a href="/A246531/b246531.txt">Table of n, a(n) for n = 0..200</a> %F A246531 a(n) = n! * [x^n] exp(Sum_{d|n} (-LambertW(-x))^d/d). %F A246531 a(n) = A246522(n,n). %p A246531 with(numtheory): %p A246531 egf:= k-> exp(add((-LambertW(-x))^d/d, d=divisors(k))): %p A246531 a:= n-> n!*coeff(series(egf(n), x, n+1), x, n): %p A246531 seq(a(n), n=0..20); %p A246531 # second Maple program: %p A246531 with(combinat): %p A246531 b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, %p A246531 add(multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1, k)* %p A246531 (i-1)!^j, j=0..`if`(irem(k, i)=0, n/i, 0)))) %p A246531 end: %p A246531 a:= n-> add(b(j$2, n)*n^(n-j)*binomial(n-1, j-1), j=0..n): %p A246531 seq(a(n), n=0..20); %t A246531 multinomial[n_, k_List] := n!/Times @@ (k!); %t A246531 b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, %t A246531 Sum[multinomial[n, Join[{n - i*j}, %t A246531 Table[i, {j}]]]/j!*b[n - i*j, i - 1, k]*(i - 1)!^j, %t A246531 {j, 0, If[Mod[k, i] == 0, n/i, 0]}]]]; %t A246531 a[n_] := If[n==0, 1, Sum[b[j, j, n]*n^(n-j)*Binomial[n-1, j-1], {j, 0, n}]]; %t A246531 Table[a[n], {n, 0, 20}] (* _Jean-François Alcover_, May 01 2022, after _Alois P. Heinz_ *) %Y A246531 Main diagonal of A246522. %K A246531 nonn %O A246531 0,3 %A A246531 _Alois P. Heinz_, Aug 28 2014