Free Online Utility • MATH Studio • Exact BigInt Engine

Partition a Number

Compute exact BigInt integer partition counts p(n) (OEIS A000041) via Euler's Pentagonal Number Theorem up to n = 1,000 and enumerate all partitions (All, Distinct Parts, or Odd Parts).

Formula & Quick Reference Live Engine
p(n) = p(n-1) + p(n-2) - p(n-5) - p(n-7) + p(n-12) + p(n-15) - ...
Generalized pentagonal numbers: g(k) = k(3k ± 1) / 2
Euler's Partition Theorem: # of partitions into DISTINCT parts === # into ODD parts
57
1042
20627
OEIS A000041 • Euler Pentagonal Theorem + Enumerator
Integer Partitions

        
100% client-side exact mathematics Instant

Session Calculation Log

No entries recorded in this session yet.

Complete Technical Guide to Partition a Number

An integer partition of a positive integer n writes n as a sum of positive integers where order does not matter: for example, 4 has p(4) = 5 partitions (4, 3+1, 2+2, 2+1+1, 1+1+1+1). Computing p(n) quickly for large n uses Leonhard Euler's Pentagonal Number Theorem.

This tool computes exact BigInt values of both p(n) (all partitions) and q(n) (distinct-part partitions) up to n = 1,000, while also enumerating individual additive sums for All, Distinct, and Odd-part partitions.

Euler's Pentagonal Number Recurrence

p(n) = p(n-1) + p(n-2) - p(n-5) - p(n-7) + p(n-12) + p(n-15) - ...
Generalized pentagonal numbers: g(k) = k(3k ± 1) / 2
Euler's Partition Theorem: # of partitions into DISTINCT parts === # into ODD parts

Watch how Distinct Parts Only and Odd Parts Only ALWAYS display the exact same partition count for every single n!

How to Use Partition a Number

  1. 1Enter any integer n from 1 to 1,000 (or click n=6, 10, 20, 100).
  2. 2Switch between All Partitions, Distinct Parts Only, and Odd Parts Only.
  3. 3Copy or download the enumerated sums.

Reference Examples & Worked Benchmarks

np(n) Allq(n) Distinct = Odd
573
104210
2062764
100190,569,292444,793

Practical Applications & Engineering Workflows

Combinatorics & Representation Theory

Partition counts p(n) equal the exact number of irreducible representations of the symmetric group S_n.

Ramanujan Congruences

Verify p(5k+4) ≡ 0 (mod 5), e.g., p(4)=5, p(9)=30, p(14)=135.

Accuracy, Edge Cases & Best Practices

  • p(1000) is a 32-digit exact integer (24,061,467,864,032,622,473,692,149,727,991) computed in milliseconds!

All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.

Frequently Asked Questions

How many partitions does 100 have?
Exactly 190,569,292 unrestricted partitions (and 444,793 partitions into distinct or odd parts).
Why do Distinct Parts and Odd Parts always have the same count?
Euler proved via generating functions Π(1 + x^k) = Π 1/(1 − x^(2k−1)) that every integer n has identically many distinct-part partitions as odd-part partitions.