WORKED DEFAULT
Check the calculation with the default inputs
For n = 8 and k = 3 positive ordered parts, there are C(7,2) = 21 compositions.
- Arrange unitsn = 8
- Choose separatorsk-1 = 2 of 7 gaps
- CountC(7,2) = 21
COMPOSITIONS / POSITIVE PARTS
Count ordered ways to express n as exactly k positive integer parts using separator positions.
METHOD / WORKED EXAMPLE
Count ordered ways to express n as exactly k positive integer parts using separator positions. The result panel keeps the defining recurrence or counting identity visible so the output can be checked independently.
WORKED DEFAULT
For n = 8 and k = 3 positive ordered parts, there are C(7,2) = 21 compositions.
READ THE RESULT
Reordering parts creates a new composition; unordered additive partitions answer a different question.
ASSUMPTIONS AND LIMITS
n and k are capped at 50 and unsafe binomial results are not displayed as exact.
COMMON QUESTIONS
Represent n units in a row and choose k-1 of the n-1 internal gaps as separators, giving C(n-1,k-1). The indexing and counted objects are stated in the method and worked example. 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.
Reordering parts creates a new composition; unordered additive partitions answer a different question. Small boundary cases and the displayed identity provide useful independent checks. 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 and k are capped at 50 and unsafe binomial results are not displayed as exact. The implementation uses integer arithmetic internally and refuses results beyond the safe display boundary. 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
Represent n units in a row and choose k-1 of the n-1 internal gaps as separators, giving C(n-1,k-1).
Count = C(n-1,k-1).