cp's OEIS Frontend

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.

A372579 Number of permutations of [n] such that the number of cycles of length k is zero or equals k for every k.

This page as a plain text file.
%I A372579 #21 Jul 04 2024 18:33:56
%S A372579 1,1,0,0,3,15,0,0,0,2240,22400,0,0,4804800,67267200,0,3405402000,
%T A372579 57891834000,0,0,49497518070000,1039447879470000,0,0,0,
%U A372579 56947245360343962624,1480628379368943028224,0,0,4057662073660588368847872,121729862209817651065436160,0,0,0
%N A372579 Number of permutations of [n] such that the number of cycles of length k is zero or equals k for every k.
%H A372579 Alois P. Heinz, <a href="/A372579/b372579.txt">Table of n, a(n) for n = 0..470</a>
%H A372579 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation">Permutation</a>
%F A372579 a(n) = 0 <=> n in { A001422 }.
%F A372579 a(n) > 0 <=> n in { A003995 }.
%e A372579 a(5) = 15 = 5*3: (1)(23)(45), (1)(24)(35), (1)(25)(34), ..., (1,2)(3,4)(5),
%e A372579   (1,3)(2,4)(5), (1,4)(2,3)(5).
%p A372579 b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
%p A372579       add(`if`(j=0 or j=i, b(n-i*j, i-1)*(i-1)!^j/j!*
%p A372579       combinat[multinomial](n, i$j, n-i*j), 0), j=0..n/i)))
%p A372579     end:
%p A372579 a:= n-> b(n$2):
%p A372579 seq(a(n), n=0..35);
%Y A372579 Cf. A001422, A003995, A372545, A374262, A374292, A374321.
%K A372579 nonn
%O A372579 0,5
%A A372579 _Alois P. Heinz_, Jul 04 2024