For positive integers $n_1,n_2$, the value of the expression $(1+i)^{n_1}+(1+i^3)^{n_1}+(1+i^5)^{n_2}+(1+i^7)^{n_2}$, where $i=\sqrt{-1}$, is a real number if and only if
Step-by-Step Solution
Key Concept: Since $(1-i)=\overline{(1+i)}$, the pair $(1+i)^n+(1-i)^n$ is always real — a number plus its conjugate. No condition on $n_1,n_2$ is required beyond them being positive integers.
**Step 1: Simplify the powers of i**
$i^3=-i,\;i^5=i,\;i^7=-i$. So the expression becomes $(1+i)^{n_1}+(1-i)^{n_1}+(1+i)^{n_2}+(1-i)^{n_2}$.
**Step 2: Observe conjugate pairs**
$(1+i)$ and $(1-i)$ are complex conjugates, so $(1+i)^n+(1-i)^n=2\,\text{Re}\left((1+i)^n\right)\in\mathbb{R}$ for every positive integer $n$.
**Step 3: Conclude**
The full expression equals $2\,\text{Re}((1+i)^{n_1})+2\,\text{Re}((1+i)^{n_2})$, which is real for all positive integers $n_1,n_2$. No further constraint is needed.
Correct Answer: 4