I want to calculate $(3+5i)^6$ with $i = \sqrt{-1}$, but somehow I'm doing something wrong.
How I calculate it:
Say $z = x + yi = 3+5i$, so $z^6$ has to be calculated. $$|z| = \sqrt{3^2+5^2} = \sqrt{34}$$ $$\text{Arg}(z) = \arctan\left(\frac{y}{x}\right) = \arctan\left(\frac{5}{3}\right)$$ $$z = |z|e^{i\text{Arg}(z)} = \sqrt{34}e^{i\arctan(5/3)}$$ $$z^6 = (\sqrt{34})^6e^{6i\arctan{(5/3)}} =39304e^6e^{i\arctan(5/3)} = 39304e^6(\cos{(\arctan{(5/3)})} + i\sin{(\arctan{(5/3)})}$$
Now to calculate $\cos{(\arctan{(5/3)})}$ and $\sin{(\arctan{(5/3)})}$, I draw a right triangle with an angle $\theta$ and edges that satisfy this.
From this triangle, $$\cos{(\arctan{(5/3)})} = \cos\theta = \frac{3}{\sqrt{34}}$$ and $$\sin{(\arctan{(5/3)})} = \sin\theta = \frac{5}{\sqrt{34}}$$
So $$z^6 = 39304e^6\left(\frac{3}{\sqrt{34}} + i\frac{5}{\sqrt{34}}\right) = \frac{\sqrt{117912e^6}}{\sqrt{34}} + i\times\frac{196520e^6}{\sqrt{34}}$$
When plugged into a calculator (or in this case Julia), this is approximately
julia> 117912e^6/sqrt(34) + im*196520e^6/sqrt(34)
8.158032643069409e6 + 1.3596721071782347e7im
So I get $z^6 \approx 8.16 + 1.36i$. (I'm writing this part because I want to document everything I did, since I don't know what I'm doing wrong.)
However when I calculate $(3 + 5i)^6$ directly, I get
julia> (3 + 5im)^6
39104 - 3960im
So I get $z^6 = 39104 - 3960i$.
What am I doing wrong? Thanks in advance.

This is not true: $$e^{6i\arctan{5/3}} = e^6e^{i\arctan{5/3}}.$$
Instead, you should incorporate the 6 within your angle: $$z^6 = 39304(\cos(6\arctan5/3) + i \sin(6\arctan5/3).$$