Convert both sides to exponential (Euler) form. Since cosx=sin(2π−x) and sinx=cos(2π−x),
sinθ+icosθ=cos(2π−θ)+isin(2π−θ)=ei(2π−θ).
By De Moivre's theorem,
(sinθ+icosθ)n=ein(2π−θ)=cos(n(2π−θ))+isin(n(2π−θ)).
The left-hand side is
sin(nθ)+icos(nθ)=cos(2π−nθ)+isin(2π−nθ)=ei(2π−nθ).
For the identity to hold (for all θ), the two exponentials must be equal:
n(2π−θ)=(2π−nθ)+2kπ,k∈Z.
The −nθ terms cancel, leaving a condition free of θ:
2nπ=2π+2kπ⟹n=1+4k.
So the equality holds exactly when n≡1(mod4).
Now count n∈{1,2,…,1001} with n≡1(mod4):
n∈{1,5,9,…,1001},1001=1+4⋅250.
Thus k runs from 0 to 250, giving 250−0+1=251 values. The answer is 251 (option 3).
Exam trick: sinθ+icosθ is NOT in standard polar form cos+isin. Rewrite it as ei(π/2−θ) first; then De Moivre forces n≡1(mod4), and the count is just ⌊(1001−1)/4⌋+1=251.