Consider the following chain of equations, where $n \in \mathbb{Z}, n \geq 3$:
$$ \mathbb{i}^{-n}\cdot 2^{n/2} = (\sqrt{-1})^{-n}\cdot 2^{n/2} =(-1)^{-n/2}\cdot 2^{n/2} = \frac{1}{(-1)^{n/2}} \cdot 2^{n/2} \, \mathrm{.} $$
As far as I know, all of them are true. However, the following is not always true, according to Mathematica:
$$ \frac{1}{(-1)^{n/2}} \cdot 2^{n/2} = \left( \frac{2}{-1} \right)^{n/2} \, \mathrm{.} $$
Why not??
Not a difficult question, I guess, but I cannot see why the last equation is either true or false depending on the value of $n$.
For instance, for $n=5$:
$$ \frac{2^{5/2}}{(-1)^{5/2}}=-\left(-\frac{2}{1}\right)^{5/2} \, \mathrm{,} $$
while, for $n=6$:
$$ \frac{2^{6/2}}{(-1)^{6/2}}= \left(-\frac{2}{1}\right)^{6/2} \, \mathrm{.} $$
I thought that the equivalence
$$\frac{a^m}{b^m} = \left( \frac{a}{b} \right)^m $$
was universally true, but it seems that it only works with real numbers?
$\sqrt{xy}=\sqrt{x}\sqrt{y}$ only applies when $x,y$ are positive numbers. It thus follows that $(\sqrt{xy})^n=(\sqrt{x}\sqrt{y})^n$ if and only if $x,y$ are positive numbers. If not, this statement cannot be made.
The equivalence of $\frac{1}{{(-1)}^\frac{n}{2}}2^{n/2}=(\frac{2}{-1})^{n/2}$ cannot be stated here because $-1$ is negative.
So if $n$ is even, then $\frac{n}{2}$ is a whole number and you avoid the problem arising with taking a square root. However, if not, then the equality will not hold.