Restricted Partition Calculator

Enter an integer n and the number of parts k to count the partitions.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

p(n,k) counts the number of ways to write a positive integer n as a sum of exactly k positive parts, ignoring order. It's computed with the classic recurrence p(n,k) = p(n−1,k−1) + p(n−k,k), which splits on whether the smallest part equals 1 or every part can be reduced by 1.

This restricted count is a building block for the broader partition function p(n) and for generating-function techniques in number theory and combinatorics. It's used by math students, competitive programmers, and researchers working on integer partition problems, where counting the ways a number breaks into pieces of a fixed count comes up constantly.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators