TITLE: Demonstration that 0 = 1
QUESTION [25 upvotes]: I have been proposed this enigma, but can't solve it. So here it is:
$$\begin{align}
e^{2 \pi i n} &= 1 \quad \forall n \in \mathbb{N} && (\times e) \tag{0} \\
e^{2 \pi i n + 1} &= e &&(^{1 + 2 \pi i n})\ \text{(raising both sides to the $2\pi in+1$ power)} \tag{1} \\
e^{(2 \pi i n + 1)(2 \pi i n + 1)} &= e^{(2 \pi i n + 1)} = e &&(\text{because of (1)}) \tag{2} \\
e^{1 + 4 \pi i n - 4 \pi^2 n^2} &= e && (\div e) \tag{3} \\
e^{4 \pi i n - 4 \pi^2 n^2} &= 1 &&(n \rightarrow +\infty) \tag{4} \\
0 &= 1 &&(?) \tag{5}
\end{align}$$
So the question is: where is the error?

REPLY [18 votes]: In complex numbers, $e^a=e^b$ does not imply that $a=b$. For instance, $e^{2\pi in+1}=e$ does not imply that $2\pi in+1=1$.
For the same reason, $\log e^a$ is not the same as $a$, and $(e^a)^a:=e^{(\log e^a)a}$ is not the same as $e^{a^2}$ (instead it is $e^{(a+2\pi ik)a}$, for some $k$).