<s>[INST] How to find $B=50-\overline{(n-1)n}$ when $n=\operatorname{Im}(z+w)$ and it requires the simplification of each complex? The problem is as follows:
First simplify the following complex numbers:
$z=3\left(\frac{1+i}{1-i}\right)+\left(\frac{1+i}{1-i}\right)^2+3\left(\frac{1+i}{1-i}\right)^3+\left(\frac{1+i}{1-i}\right)^4+...+3\left(\frac{1+i}{1-i}\right)^{4n+1}+\left(\frac{1+i}{1-i}\right)^{4n+2}$
$w=\left(\frac{1-2i}{2+i}\right)+\left(\frac{2-3i}{3+2i}\right)^2+\left(\frac{3-4i}{4+3i}\right)^3+\left(\frac{4-5i}{5+4i}\right)^4+...+\left(\frac{(4n+2)-(4n+3)i}{(4n+3)+(4n+2)i}\right)^{4n+2}$
After doing this find the value of $B$ from $n$:
$n=\operatorname{Im}(z+w)$
$B=50-\overline{(n-1)n}$
The alternatives given on my book are as follows:
$\begin{array}{ll}
1.&\textrm{5}\\
2.&\textrm{27}\\
3.&\textrm{38}\\
4.&\textrm{16}\\
\end{array}$
I'm very confused with how to approach this problem?. My best effort was to spot this:
$\left(\frac{1+i}{1-i}\right)=i$
This makes the earlier equation simplified a little bit, hence becoming the expression as follows:
$z=3\left(\frac{1+i}{1-i}\right)+\left(\frac{1+i}{1-i}\right)^2+3\left(\frac{1+i}{1-i}\right)^3+\left(\frac{1+i}{1-i}\right)^4+...+3\left(\frac{1+i}{1-i}\right)^{4n+1}+\left(\frac{1+i}{1-i}\right)^{4n+2}$
$z=3\left(i\right)+\left(i\right)^2+3\left(i\right)^3+\left(i\right)^4+...+3\left(i\right)^{4n+1}+\left(i\right)^{4n+2}$
But the thing is what to do from here?.
The rest, I mean for the second complex number seems that is more convoluted:
$w=\left(\frac{1-2i}{2+i}\right)+\left(\frac{2-3i}{3+2i}\right)^2+\left(\frac{3-4i}{4+3i}\right)^3+\left(\frac{4-5i}{5+4i}\right)^4+...+\left(\frac{(4n+2)-(4n+3)i}{(4n+3)+(4n+2)i}\right)^{4n+2}$
This second complex number doesn't seem to be easy to simplify.
I'm not really sure what sort of algebraic manipulation should be done here?. Can someone help me here?.
Since I'm not very savvy with this I really appreciate that someone could help me here with the most details as possible.
 [/INST] The complicated expressions are only there to confuse you. You've noticed that $\frac{1+i}{1-i}=i$, so
$$z=[3(i)+(-1)+3(-i)+(1)]_n+3(i)+(-1)$$
where the part in square brackets, which is zero, repeats $n$ times so it may be ignored. Similarly, every fraction in brackets in $w$ is of the form $\frac k{ik}=-i$ for some $k$, so
$$w=[(-i)+(-1)+(i)+(1)]_n+(-i)+(-1)$$
and again the part in square brackets is repeated and is zero.
Thus $z=3i-1$, $w=-i-1$, $z+w=2i-2$, $n=2$ and $B=50-1\cdot2=48$.
</s>