Show that $-1^2+3^2-5^2\mp ...+(2^n-1)^2=2^{2n-1}$ Playing with numbers, I construct following expression.

Can it be shown that
$$\sum_{i=1}^{2^{n-1}}(-1)^i(2i-1)^2=2^{2n-1}$$

attempt
We can construct following, using finite calculus as
$(-1)^2+3^2+7^2+...+(4k-5)^2 = \binom{k}1+8\binom{k}2+32\binom{k}3\quad\quad eq(1)$
$1^2+5^2+9^2+...+(4k-3)^2 = \binom{k}1+24\binom{k}2+32\binom{k}3\quad\quad eq(2)$
Let $4k-1=2^n-1$ so we can write above claim as
$eq(1)-eq(2)-1+(4k-1)^2=2^{2n-1}$
Which is equivalent to show
$(2^n-1)^2-16\binom{2^{n-2}}2-1= 2^{2n-1}$
Here I'm stuck. Thanks
 A: For $n\leftarrow 2$, the equality holds.
Let's assume it holds for $n\leftarrow k\in\Bbb{N}$, $k\ge 2$. Then
$$\color{black}{\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1)^2 = 2^{2k-1}}$$
We want to show that the equality holds for $k+1$, i.e., that
$$\color{red}{\sum_{i=1}^{2^{k}}(-1)^i(2i-1)^2 = 2^{2k+1}}$$
In fact
$\color{black}{\begin{aligned}
\sum_{i=1}^{2^{k}}(-1)^i(2i-1)^2 &&=\\
\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1)^2 &+ \sum_{i=2^{k-1}+1}^{2^k}(-1)^i(2i-1)^2 &=\\
\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1)^2 &+ \sum_{i=1}^{2^{k-1}}(-1)^{2^{k-1}+i}(2(2^{k-1}+i)-1)^2 &=\\
\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1)^2 &+ \sum_{i=1}^{2^{k-1}}(-1)^i(2^k+2i-1)^2 &=\\
\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1)^2 &+ \sum_{i=1}^{2^{k-1}}(-1)^i(2^{2k}+2^{k+1}(2i-1)+(2i-1)^2) &=\\
2\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1)^2 &+ \sum_{i=1}^{2^{k-1}}(-1)^i(2^{2k}+2^{k+1}(2i-1)) &=\\
2(2^{2k-1}) &+ \underbrace{\sum_{i=1}^{2^{k-1}}(-1)^i(2^{2k})}_0 + \sum_{i=1}^{2^{k-1}}(-1)^i(2^{k+1}(2i-1)) &=\\
2^{2k} &+ 2^{k+1}\sum_{i=1}^{2^{k-1}}(-1)^i(2i-1) &
\end{aligned}}$
It's well known (and easy to show) that $\begin{aligned}\sum_{i=1}^{m}(-1)^i(2i-1) = (-1)^m m\end{aligned}$, so it is proven that
$$\sum_{i=1}^{2^{k}}(-1)^i(2i-1)^2 = 2^{2k} + 2^{k+1}2^{k-1} = 2^{2k+1}$$
A: Using the Hockey-stick identity:
$$S(n)=\sum_{k=0}^{n-1} (2k+1)^2=\sum_{k=0}^{n-1} \left(8{k+1\choose 2}+1\right)=8{n+1\choose 3}+n=\frac{n(2n+1)(2n-1)}{3}$$
$$T(n)=\sum_{k=0}^{n-1} (4k+1)^2=\sum_{k=0}^{n-1} \left( 16k^2+8k+1\right)=\sum_{k=0}^{n-1} \left(32{k+1\choose2}-8{k+1\choose1}+9\right)\\=32{n+1\choose3}-8{n+1\choose2}+9n=\frac n3(16n^2-12n-1)$$
Let $N=2^{n-2}$, then
$$-1^2+3^2-5^2+\dots+(2^n-1)^2\\=-1^2+3^2-5^2+\dots+(4N-1)^2\\=S(2N)-2T(N)\\=8N^2\\=2^{2n-1}$$

To answer the comment:
$$1^2+3^2+5^2+\dots+(4N-1)^2=\sum_{k=0}^{2N-1} (2k+1)^2=S(2N)$$
$$1^2+5^2+\dots+(4N-3)^3=1^2+5^2+\dots+(4(N-1)+1)^3=\sum_{k=0}^{N-1}(4k+1)^2=T(N)$$
Now, the first row minus twice the second row yields:
$$-1^2+3^2-5^2+\dots+(4N-1)^2=S(2N)-2T(N)$$
A: Hint: What is $\sum_{k=1}^N k^2 i^k$, where $i^2=-1$? Then take its imaginary part.
Solution:
The sum in question is $-\sum_{k=1}^N k^2 i^k=\frac12 ((i-1)i^N N^2 -2i^N-i^{N+1}+i)$.
When $N$ is a multiple of $4$ we have $i^4=1$ and so the imaginary part is $\frac12 N^2$.
When $N=2^{n}$ (so that the last term is $2^n-1$), the sum is thus  $\frac12 2^{2n} = 2^{2n-1}$.
A: One acxtually gets $$\sum_{k=1}^{n} (-1)^k (2k-1)^2=\frac{1}{2}[1-(-1)^n+ 4(-1)^n n^2]$$
