Adds up nC0 + nC1 + … + nCn, the sum of row n of Pascal's triangle. It always equals 2ⁿ, the number of subsets of an n-element set.
Explanation
The binomial coefficient (kn) counts the ways of choosing k items out of n. Add these up across every k from 0 to n and the total always lands on 2n exactly. In terms of Pascal's triangle, you are summing row n.
(0n)+(1n)+⋯+(nn)=2n - n — an integer of 0 or greater
- Sum — the binomial coefficients added together
- 2n — shown alongside for comparison; the two should agree
The identity is clearest when you count subsets two ways. The left side sorts the subsets of an n-element set by size and tallies each group separately. The right side counts the same subsets by walking through the n elements and deciding, for each one, whether to include it: two choices, n times over. Same collection, two ways of counting it, so the totals must match.
Example
Take n=10. Row 10 of Pascal's triangle reads
1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1 Adding those eleven numbers gives 1024, which is exactly 210.
Notes
- n must be a whole number of 0 or greater. At n=0 the sum is (00)=1, matching 20=1.
- The identity is just the binomial theorem (1+x)n=∑k(kn)xk evaluated at x=1.
- Every row is symmetric, because (kn)=(n−kn). Above, the values mirror around the central 252.
- This calculator allows n up to 53. Double-precision arithmetic holds integers exactly only up to 253, and beyond that the sum and 2n would print as two different numbers. For larger n, use the power calculator to get 2n.