In short

The binomial theorem expands (1 + x)^n into a sum of terms \binom{n}{r}x^r. By substituting complex numbers — especially the cube roots of unity 1, \omega, \omega^2 — you can isolate specific sub-sums of the binomial coefficients: the sum of every third coefficient, or the sum of only the even-indexed or odd-indexed terms. These tricks appear throughout JEE problems on binomial identities.

You know how to expand (1 + x)^n and you know that setting x = 1 gives \sum \binom{n}{r} = 2^n, while x = -1 gives the alternating sum \sum (-1)^r \binom{n}{r} = 0. These are the first two "substitution tricks" — plug in a specific value of x and the sum collapses to something neat.

But what if you want only the coefficients at positions r = 0, 3, 6, 9, \dots — every third coefficient? Setting x = 1 adds all of them, and x = -1 alternates signs. Neither isolates the ones divisible by 3. There is no real number you can plug in to do this.

The key insight: a cube root of unity \omega = e^{2\pi i/3} = -\frac{1}{2} + \frac{\sqrt{3}}{2}i cycles with period 3: \omega^0 = 1, \omega^1 = \omega, \omega^2 = \omega^2, \omega^3 = 1, \omega^4 = \omega, and so on. This periodicity is exactly the filter you need.

The roots-of-unity filter

Here is the central idea. Start with the expansion:

(1 + x)^n = \sum_{r=0}^{n} \binom{n}{r} x^r = \binom{n}{0} + \binom{n}{1}x + \binom{n}{2}x^2 + \binom{n}{3}x^3 + \cdots

Write three equations by substituting x = 1, x = \omega, and x = \omega^2:

2^n = \binom{n}{0} + \binom{n}{1} + \binom{n}{2} + \binom{n}{3} + \binom{n}{4} + \binom{n}{5} + \cdots
(1 + \omega)^n = \binom{n}{0} + \binom{n}{1}\omega + \binom{n}{2}\omega^2 + \binom{n}{3}\omega^3 + \binom{n}{4}\omega^4 + \cdots
(1 + \omega^2)^n = \binom{n}{0} + \binom{n}{1}\omega^2 + \binom{n}{2}\omega^4 + \binom{n}{3}\omega^6 + \binom{n}{4}\omega^8 + \cdots

Now add all three equations. Look at what happens to each coefficient \binom{n}{r}:

So adding the three equations kills every term where r is not divisible by 3, and triples the ones that are:

2^n + (1+\omega)^n + (1+\omega^2)^n = 3\left[\binom{n}{0} + \binom{n}{3} + \binom{n}{6} + \cdots\right]
Roots of unity filter: adding three substitutions to isolate every third binomial coefficientThree rows show the substitutions x=1, x=omega, x=omega-squared into the binomial expansion. Each coefficient C(n,r) is multiplied by x to the r. When the three rows are added, terms where r is not a multiple of 3 cancel (shown with strike-through), and terms where r is a multiple of 3 survive with a factor of 3. The roots-of-unity filter for every-third-term x = 1: C₀ + C₁ + C₂ + C₃ + C₄ + C₅ + C₆ x = ω: C₀ + C₁ω + C₂ω² + C₃ + C₄ω + C₅ω² + C₆ x = ω²: C₀ + C₁ω² + C₂ω⁴ + C₃ + C₄ω² + C₅ω⁴ + C₆ Sum: 3C₀ 0 0 3C₃ 0 0 3C₆ For r not divisible by 3: 1 + ωʳ + ω²ʳ = 0 → cancels For r divisible by 3: 1 + 1 + 1 = 3 → survives C₀ + C₃ + C₆ + ⋯ = (2ⁿ + (1+ω)ⁿ + (1+ω²)ⁿ) / 3 Cᵣ stands for C(n, r)
The roots-of-unity filter. When you add the three substitutions $x = 1$, $x = \omega$, $x = \omega^2$, the terms at positions not divisible by $3$ cancel because $1 + \omega^r + \omega^{2r} = 0$. Only every third coefficient survives, multiplied by $3$.

This is the roots-of-unity filter — one of the most elegant uses of complex numbers in combinatorics.

Simplifying (1 + \omega)^n and (1 + \omega^2)^n

To make the formula concrete, you need to know the values of 1 + \omega and 1 + \omega^2.

Recall \omega = -\frac{1}{2} + \frac{\sqrt{3}}{2}i and \omega^2 = -\frac{1}{2} - \frac{\sqrt{3}}{2}i.

1 + \omega = \frac{1}{2} + \frac{\sqrt{3}}{2}i

Convert to polar form. The modulus is |1 + \omega| = \sqrt{\frac{1}{4} + \frac{3}{4}} = 1, and the argument is \frac{\pi}{3} (since \cos\frac{\pi}{3} = \frac{1}{2} and \sin\frac{\pi}{3} = \frac{\sqrt{3}}{2}). So:

1 + \omega = e^{i\pi/3}

Similarly, 1 + \omega^2 = \frac{1}{2} - \frac{\sqrt{3}}{2}i = e^{-i\pi/3}.

Argand diagram showing omega, 1+omega, omega-squared, and 1+omega-squaredThe complex plane with the unit circle shown. The three cube roots of unity 1, omega, omega-squared are marked on the circle. The points 1+omega and 1+omega-squared are also plotted, both on the unit circle at angles pi/3 and negative pi/3. Re Im unit circle 1 ω = −½ + (√3/2)i ω² = −½ − (√3/2)i 1 + ω = ½ + (√3/2)i = e^(iπ/3) 1 + ω² = ½ − (√3/2)i = e^(−iπ/3) π/3 −π/3
The cube roots of unity $1, \omega, \omega^2$ sit on the unit circle at angles $0, 2\pi/3, 4\pi/3$. The points $1 + \omega$ and $1 + \omega^2$ are conjugates, both on the unit circle at $\pm\pi/3$.

By De Moivre's theorem:

(1 + \omega)^n = e^{in\pi/3} = \cos\frac{n\pi}{3} + i\sin\frac{n\pi}{3}
(1 + \omega^2)^n = e^{-in\pi/3} = \cos\frac{n\pi}{3} - i\sin\frac{n\pi}{3}

Adding these two: (1+\omega)^n + (1+\omega^2)^n = 2\cos\frac{n\pi}{3}.

So the every-third-coefficient sum becomes:

Sum of every third binomial coefficient

\binom{n}{0} + \binom{n}{3} + \binom{n}{6} + \cdots = \frac{2^n + 2\cos\frac{n\pi}{3}}{3}

The value of \cos\frac{n\pi}{3} cycles with period 6:

n \bmod 6 0 1 2 3 4 5
\cos\frac{n\pi}{3} 1 \frac{1}{2} -\frac{1}{2} -1 -\frac{1}{2} \frac{1}{2}

For n = 6: \binom{6}{0} + \binom{6}{3} + \binom{6}{6} = 1 + 20 + 1 = 22. From the formula: \frac{64 + 2(1)}{3} = \frac{66}{3} = 22. It checks out.

Separating real and imaginary parts

There is a second powerful technique: expand (1 + x)^n with x = i (the imaginary unit) and separate real and imaginary parts.

Set x = i in (1 + x)^n = \sum \binom{n}{r} x^r:

(1 + i)^n = \binom{n}{0} + \binom{n}{1}i + \binom{n}{2}i^2 + \binom{n}{3}i^3 + \binom{n}{4}i^4 + \cdots

The powers of i cycle with period 4: i^0 = 1, i^1 = i, i^2 = -1, i^3 = -i, i^4 = 1, and so on. Grouping real and imaginary parts:

Real part: \binom{n}{0} - \binom{n}{2} + \binom{n}{4} - \binom{n}{6} + \cdots

Imaginary part: \binom{n}{1} - \binom{n}{3} + \binom{n}{5} - \binom{n}{7} + \cdots

To evaluate these, convert 1 + i to polar form. The modulus is \sqrt{2} and the argument is \pi/4, so (1 + i)^n = (\sqrt{2})^n \, e^{in\pi/4} = 2^{n/2}\left(\cos\frac{n\pi}{4} + i\sin\frac{n\pi}{4}\right).

Equating real and imaginary parts:

\binom{n}{0} - \binom{n}{2} + \binom{n}{4} - \cdots = 2^{n/2}\cos\frac{n\pi}{4}
\binom{n}{1} - \binom{n}{3} + \binom{n}{5} - \cdots = 2^{n/2}\sin\frac{n\pi}{4}
Separating real and imaginary parts of (1+i) to the nA diagram showing (1+i) to the n equals the real part (alternating sum of even-indexed binomial coefficients) plus i times the imaginary part (alternating sum of odd-indexed coefficients). Both parts are expressed in terms of 2 to the n/2 times cosine and sine of n pi over 4. Separating real and imaginary parts of (1 + i)ⁿ Real part: C₀ − C₂ + C₄ − C₆ + ⋯ Imaginary part: C₁ − C₃ + C₅ − C₇ + ⋯ = 2^(n/2) cos(nπ/4) = 2^(n/2) sin(nπ/4) (1 + i)ⁿ = 2^(n/2) [cos(nπ/4) + i sin(nπ/4)] Cᵣ stands for C(n, r)
Setting $x = i$ and equating real and imaginary parts gives closed-form expressions for the alternating sums of even-indexed and odd-indexed binomial coefficients.

Special sums — a toolkit

The substitution method is versatile. Here is a summary of the most useful special sums, all derived from the binomial expansion of (1 + x)^n with carefully chosen values of x.

Substitution Result
x = 1 \displaystyle\sum_{r=0}^{n} \binom{n}{r} = 2^n
x = -1 \displaystyle\sum_{r=0}^{n} (-1)^r \binom{n}{r} = 0
Add x = 1 and x = -1 \binom{n}{0} + \binom{n}{2} + \binom{n}{4} + \cdots = 2^{n-1}
Subtract x = -1 from x = 1 \binom{n}{1} + \binom{n}{3} + \binom{n}{5} + \cdots = 2^{n-1}
x = 1, \omega, \omega^2 (add) \binom{n}{0} + \binom{n}{3} + \binom{n}{6} + \cdots = \frac{2^n + 2\cos\frac{n\pi}{3}}{3}
x = i (real part) \binom{n}{0} - \binom{n}{2} + \binom{n}{4} - \cdots = 2^{n/2}\cos\frac{n\pi}{4}
x = i (imaginary part) \binom{n}{1} - \binom{n}{3} + \binom{n}{5} - \cdots = 2^{n/2}\sin\frac{n\pi}{4}

The pattern: pick x so that x^r cycles with the same period as the filter you want, then add or subtract the equations to isolate the desired sub-sum.

Visual summary of substitution strategies and the sums they isolateFour rows showing the substitution x=1 isolates all coefficients, x=-1 gives alternating signs, x=omega filters every third coefficient, and x=i separates even-indexed from odd-indexed. Which substitution isolates which sub-sum? x = 1 → all coefficients: Σ C(n,r) = 2ⁿ x = −1 → alternating sum: Σ (−1)ʳ C(n,r) = 0 x = ω → every 3rd coefficient: C₀ + C₃ + C₆ + ⋯ x = i → even vs odd indexed (real vs imaginary) the period of xʳ determines which coefficients survive
Each substitution acts as a filter. The period of $x^r$ determines which positions in the binomial expansion survive the summation.

Interactive: watch the cube-roots filter in action

Set n from 3 to 9 using the slider. The bar chart shows all \binom{n}{r} values. The bars at positions r = 0, 3, 6, \dots are highlighted in red — these are the ones that survive the roots-of-unity filter. The readout shows their sum and compares it to \frac{2^n + 2\cos(n\pi/3)}{3}.

Interactive: roots-of-unity filter on binomial coefficientsA bar chart showing binomial coefficients C(n,r) for r from 0 to n. Bars at positions divisible by 3 are highlighted in red. A draggable point sets n from 3 to 9. The readout shows the sum of highlighted bars and the formula value. r C(n,r) 0 1 2 3 4 5 6 7 8 9 ↔ drag the red point
The red bars mark coefficients at positions $r \equiv 0 \pmod{3}$ — the ones picked out by the cube-roots-of-unity filter. As you change $n$, notice that the sum of red bars always equals $\frac{2^n + 2\cos(n\pi/3)}{3}$.

Two worked examples

Example 1: Find $\binom{9}{0} + \binom{9}{3} + \binom{9}{6} + \binom{9}{9}$

Step 1. Recognise the pattern. The sum picks out every third binomial coefficient from row n = 9, starting at r = 0.

Why: the positions 0, 3, 6, 9 are exactly the multiples of 3. This is the roots-of-unity filter.

Step 2. Apply the formula. With n = 9:

\binom{9}{0} + \binom{9}{3} + \binom{9}{6} + \binom{9}{9} = \frac{2^9 + 2\cos\frac{9\pi}{3}}{3}

Why: use \binom{n}{0} + \binom{n}{3} + \binom{n}{6} + \cdots = \frac{2^n + 2\cos(n\pi/3)}{3} directly.

Step 3. Evaluate \cos\frac{9\pi}{3}. Since \frac{9\pi}{3} = 3\pi, and \cos 3\pi = \cos\pi = -1.

Why: 3\pi and \pi differ by 2\pi, so they have the same cosine.

Step 4. Compute the answer.

= \frac{512 + 2(-1)}{3} = \frac{512 - 2}{3} = \frac{510}{3} = 170

Step 5. Verify directly. \binom{9}{0} = 1, \binom{9}{3} = 84, \binom{9}{6} = 84, \binom{9}{9} = 1. Sum: 1 + 84 + 84 + 1 = 170.

Result: \binom{9}{0} + \binom{9}{3} + \binom{9}{6} + \binom{9}{9} = 170.

Row 9 of Pascal's triangle with every-third entry highlightedTen binomial coefficients C(9,0) through C(9,9) are shown in a row. The entries at positions 0, 3, 6, 9 are highlighted in red. Their values 1, 84, 84, 1 sum to 170. Row n = 9: highlighting every 3rd coefficient r=0 r=1 r=2 r=3 r=4 r=5 r=6 r=7 r=8 r=9 1 9 36 84 126 126 84 36 9 1 1 + 84 + 84 + 1 = 170 = (2⁹ + 2 cos 3π) / 3 = (512 − 2) / 3 = 170 unhighlighted coefficients: 9 + 36 + 126 + 126 + 36 + 9 = 342 = 512 − 170
Row $9$ of Pascal's triangle. The red-boxed entries at $r = 0, 3, 6, 9$ sum to $170$. The remaining entries sum to $512 - 170 = 342$. Both sub-sums follow from the roots-of-unity filter formula.

The direct verification confirms the formula. Without complex numbers, computing this sum would require calculating each coefficient separately — the filter gives it in one shot.

Example 2: Find $\binom{8}{0} - \binom{8}{2} + \binom{8}{4} - \binom{8}{6} + \binom{8}{8}$

Step 1. Recognise the pattern. This is the alternating sum of even-indexed binomial coefficients from row n = 8 — exactly the real part of (1 + i)^n.

Why: the pattern +C_0, -C_2, +C_4, -C_6, +C_8 matches \text{Re}[(1+i)^n] because i^0 = 1, i^2 = -1, i^4 = 1, i^6 = -1, i^8 = 1.

Step 2. Apply the formula with n = 8.

\binom{8}{0} - \binom{8}{2} + \binom{8}{4} - \binom{8}{6} + \binom{8}{8} = 2^{8/2}\cos\frac{8\pi}{4} = 2^4 \cos 2\pi

Why: the real-part formula gives 2^{n/2}\cos(n\pi/4).

Step 3. Evaluate. \cos 2\pi = 1, so the sum is 16 \cdot 1 = 16.

Why: 2\pi is a full rotation, bringing cosine back to 1.

Step 4. Verify. \binom{8}{0} = 1, \binom{8}{2} = 28, \binom{8}{4} = 70, \binom{8}{6} = 28, \binom{8}{8} = 1. The alternating sum: 1 - 28 + 70 - 28 + 1 = 16.

Result: \binom{8}{0} - \binom{8}{2} + \binom{8}{4} - \binom{8}{6} + \binom{8}{8} = 16.

Alternating sum of even-indexed binomial coefficients for n=8The even-indexed coefficients C(8,0), C(8,2), C(8,4), C(8,6), C(8,8) are shown with alternating plus and minus signs. Their values 1, 28, 70, 28, 1 produce the alternating sum 1 minus 28 plus 70 minus 28 plus 1 equals 16, matching 2 to the 4 times cosine of 2 pi. Alternating sum of even-indexed C(8, r) +1 C(8,0) −28 C(8,2) +70 C(8,4) −28 C(8,6) +1 C(8,8) 1 − 28 + 70 − 28 + 1 = 16 = 2⁴ · cos(2π) = 16 · 1 = 16 from Re[(1+i)⁸] = Re[2⁴ · e^(i·2π)] = 16
The alternating sum $+1 - 28 + 70 - 28 + 1 = 16$ equals $2^4\cos 2\pi$. The massive cancellations collapse to a clean power of $2$ — the real part of $(1+i)^8$ running one full cycle around the origin.

The sum 1 - 28 + 70 - 28 + 1 looks like it should be complicated, but the complex-number approach collapses it to 16 in one line. That is the power of this technique: large cancellations that are painful to do directly become automatic when viewed through the lens of complex exponentials.

Common confusions

Going deeper

If you can apply the roots-of-unity filter, separate real and imaginary parts from (1+i)^n, and evaluate the resulting trigonometric expressions, you have the complete toolkit for this topic. What follows is for readers who want to see the general principle.

The general k-th roots filter

The cube-roots filter for every third coefficient is a special case of a general idea. To extract every k-th coefficient — those at positions r \equiv 0 \pmod{k} — use the k-th roots of unity 1, \zeta, \zeta^2, \dots, \zeta^{k-1} where \zeta = e^{2\pi i/k}. The identity

\sum_{j=0}^{k-1} \zeta^{jr} = \begin{cases} k & \text{if } k \mid r \\ 0 & \text{if } k \nmid r \end{cases}

is the orthogonality relation for roots of unity. Adding the k equations from x = 1, \zeta, \zeta^2, \dots, \zeta^{k-1}:

\sum_{j=0}^{k-1} (1 + \zeta^j)^n = k \sum_{\substack{r=0 \\ k \mid r}}^{n} \binom{n}{r}

For k = 2 this gives the even-coefficient sum 2^{n-1}. For k = 3 it gives the formula derived above. For k = 4, you would use the fourth roots of unity 1, i, -1, -i.

Relation to the Discrete Fourier Transform

The roots-of-unity filter is, in disguise, the Discrete Fourier Transform (DFT) applied to the sequence of binomial coefficients. The DFT is the workhorse behind signal processing, data compression, and fast polynomial multiplication. The fact that you can use it to pick apart binomial sums is a hint that these ideas from algebra, combinatorics, and analysis are all connected at a deep level.

Where this leads next