WORKED DEFAULT
Check the calculation with the default inputs
For n = 6 and k = 2, choose 2 fixed positions in 15 ways and derange the other 4 in 9 ways, giving 135.
- Choose fixed pointsC(6,2)=15
- Derange remainder!4=9
- Multiply15 x 9 = 135
COMBINATORICS / EXACT FIXED POINTS
Count permutations of n labelled elements having exactly k fixed points by deranging every remaining position.
METHOD / WORKED EXAMPLE
Count permutations of n labelled elements having exactly k fixed points by deranging every remaining position. The result panel keeps the defining recurrence or counting identity visible so the output can be checked independently.
WORKED DEFAULT
For n = 6 and k = 2, choose 2 fixed positions in 15 ways and derange the other 4 in 9 ways, giving 135.
READ THE RESULT
The output requires exactly k fixed points; choosing at least k or leaving the remainder unrestricted would count a different set.
ASSUMPTIONS AND LIMITS
n is capped at 18 so every exact fixed-point class remains within safe-integer storage.
COMMON QUESTIONS
Choose the k fixed positions with C(n,k), derange the remaining n-k positions, and multiply the two exact counts. The k=0 edge is exactly the existing derangement count, while other k values refine the permutation set. Inputs must be whole numbers inside the displayed domain; the page never rounds a decimal into an accepted index. This ties the answer to one explicit convention instead of silently mixing sequence offsets or combinatorial interpretations.
The output requires exactly k fixed points; choosing at least k or leaving the remainder unrestricted would count a different set. Multiply the displayed position choice by the derangement of the remaining positions. Recompute the displayed recurrence or closed form with the same inputs and compare its previous terms or counting factors. That check supports this bounded result, but it does not transfer the interpretation to a different sequence or counting object.
n is capped at 18 so every exact fixed-point class remains within safe-integer storage. The n cap keeps all factorial-scale classes exact. Combinatorial and recurrence values can grow rapidly even when the inputs look small. The conservative cap prevents browser stalls and avoids presenting an unsafe floating-point integer as exact; larger work needs arbitrary-precision software and independent resource controls.
RELATED TOOLS
Use boundary
Choose the k fixed positions with C(n,k), derange the remaining n-k positions, and multiply the two exact counts.
D(n,k)=C(n,k) !(n-k).