I am trying to connect $a,b,n$ such that $$\Im\left ((a+bi)^n \right )=0, a,b \in \mathbb{R}, n \in \mathbb{N^*} \mathrm{or } \; \mathbb{R^*}$$
What I tried was write $(a+bi)^n$ as $\sqrt{a^2+b^2} e^{n i \theta}$ where
$$\theta= \begin{cases} \arctan\left(\frac{b}{a}\right) \quad \text{if} \quad a,b>0 \\ \pi- \arctan\left(\frac{b}{a}\right) \quad \text{if} \quad a<0, b>0 \\-\arctan\left(\frac{b}{a}\right) \quad \text{if} \quad a>0, b<0 \\-\left[\pi-\arctan\left(\frac{b}{a}\right)\right] \quad \text{if} \quad a<0, b<0 \\ \quad \\ 0 \quad \text{if} \quad a>0, b=0 \\ \quad \\ \frac{\pi}{2} \quad \text{if} \quad a=0, b>0\ \\ \quad \\ \pi \quad \text{if} \quad a<0, b=0 \\ \quad \\ -\frac{\pi}{2} \quad \text{if} \quad a=0, b<0 \\ \quad \\ \text{undefined} \quad \text{if} \quad a=b=0 \end{cases} \quad ,$$
Then it must hold that $\frac{n \theta}{\pi} \in \mathbb{Z}$ if we want $\Im\left( (a+bi)^n\right )=0$
This is where I'm stuck as my number theory(that's what I suspect is needed to connect $a,b,n$) knowledge is close to non-existent.
The "or" up there is an extension of the problem.
$$Im(e^{in\theta})=\sin(n\theta)=0 \iff n\theta=k\pi$$