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 A124795 #41 Apr 07 2025 23:39:17 %S A124795 1,1,1,1,2,3,6,1,3,8,24,6,120,30,20,1,720,15,5040,20,90,144,40320,10, %T A124795 40,840,15,90,362880,120,3628800,1,504,5760,420,45,39916800,45360, %U A124795 3360,40,479001600,630,6227020800,504,210,403200,87178291200,15,1260,280,25920 %N A124795 Number of permutations with given cycle structure, in the prime factorization order. %C A124795 Number of permutations with k1 1-cycles, k2 2-cycles, ... %H A124795 Gheorghe Coserea, <a href="/A124795/b124795.txt">Table of n, a(n) for n = 1..3000</a> %H A124795 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PermutationCycle.html">Permutation cycle</a> %F A124795 For n = p1^k1*p2^k2*... where 2=p1<p2<... is the sequence of all primes, a(n) = a([k1,k2,...]) = (k1+2*k2+...)!/((k1!*k2!*...)*(1^k1*2^k2*...)). %t A124795 a[1] = 1; a[n_] := (f1 = FactorInteger[n]; rr = Range[PrimePi[f1[[-1, 1]]]]; f2 = {Prime[#], 0}& /@ rr; ff = Union[f1, f2] //. {b___, {p_, 0}, {p_, k_}, c___} -> {b, {p, k}, c}; kk = ff[[All, 2]]; (kk.rr)!/Times @@ (kk!)/Times @@ (rr^kk)); Array[a, 100] (* _Jean-François Alcover_, Feb 02 2018 *) %o A124795 (PARI) %o A124795 a(n) = { %o A124795 my(f=factor(n), fsz=matsize(f)[1], %o A124795 g=sum(k=1, fsz, primepi(f[k, 1]) * f[k, 2])!, %o A124795 h=prod(k=1, fsz, primepi(f[k, 1])^f[k, 2])); %o A124795 g/(prod(k=1, fsz, f[k, 2]!) * h); %o A124795 }; %o A124795 vector(51, n, a(n)) \\ _Gheorghe Coserea_, Feb 02 2018; edited by _Max Alekseyev_, Feb 05 2018 %Y A124795 Cf. A000040. %K A124795 nonn %O A124795 1,5 %A A124795 _Max Alekseyev_, Nov 07 2006