Consider the complex number $\omega = \frac{1+i}{\sqrt{2}} $. Find the value of $(\sum_{k=0}^n z^{k^2}) (\sum_{j=0}^n z^{-j^2})$
I started by collecting the terms with similar but opposite sign indices and writing the sum in polar form, but I am unable to proceed with the other terms