<s>[INST] 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
 [/INST] 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}$.
</s>