derangements_no_two_cycles_count
def
For a natural number n, derangements_no_two_cycles_count n is the number of permutations of Fin n that have no cycles of length 1 and no cycles of length 2.
Statement
def derangements_no_two_cycles_count (n : ℕ) : ℕ- Defined in
- scout/2610-40342-a-p-adic-valuation-calculus-for-permutations-with-restricte.md:1608
- Verified
- 07 Nov 2026
- Axioms
- none listed
- Built on 1
- restricted_cycle_perms_countFor a natural number n and a finite set S of natural numbers, the number of permutations σ of Fin n such that for every element x of Fin…
- Used by 4
- derangements_no_two_cycles_quotientFor a natural number n, derangements_no_two_cycles_quotient n is the quotient of the number of derangements of Fin n without 2-cycles…
- derangements_no_two_cycles_quotient_threeThe quotient derangements_no_two_cycles_quotient 3 equals 1.
- derangements_no_two_cycles_quotient_ge_factorialFor every natural number n ≥ 3, the quotient derangements_no_two_cycles_quotient n is at least (n - 3)!.
- derangements_no_two_cycles_count_threeThe number of derangements without 2-cycles of a 3-element set equals 2.
Read back from the Lean
The function derangements_no_two_cycles_count takes a natural number $n$ and returns the number of permutations $\sigma$ of $\mathrm{Fin}(n)$ such that for every element $x \in \mathrm{Fin}(n)$, the length of the cycle containing $x$ under $\sigma$ is neither $1$ nor $2$ (that is, permutations of an $n$-element set with no fixed points and no $2$-cycles).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- Number of derangements of Fin n having no 2-cycles, i.e. permutations avoiding cycle lengths 1 and 2. -/ def derangements_no_two_cycles_count (n : ℕ) : ℕ := restricted_cycle_perms_count n {1, 2}