Write $w= e^{2\pi i/m}$ for $m \geq 3$. Consider the number field $K = \Bbb{Q}(\omega)$ and the ring of integers $\mathcal{O}_K = \Bbb{Z}[w]$ that has the usual integral basis
$B = \{1,w,w^2,\ldots,w^{\varphi(m) - 1}\}$ where $\varphi$ is the Euler Totient function. I have been stuck for the past few days in trying to show that
$A = \{1,w,w^{-1},w^2,w^{-2},\ldots, w^{\frac{\varphi(m)}{2} -1},w^{-(\frac{\varphi(m)}{2} -1)},w^{\varphi(m)/2} \}$
is also an integral basis for $\Bbb{Z}[w]$. Now there are $\varphi(m)$ distinct elements of $A$ and since $\mathcal{O}_K$ is free abelian and just need to show that $A$ is a generating set for $\mathcal{O}_K$.
Now if $m$ is a prime number this is clear, next I tried when $m = p^n$ a power of a prime. However even I am having trouble trying to show that $A$ is an integral basis.
Question: Is there a quick way to see why $A$ should also be an integral basis for $\mathcal{O}_K$?
My approach as before was say $m = p^n$. Then the minimal polynomial for $w$ is $\sum_{k=0}^{p-1} x^{kp^{n-1}}$. To prove $B$ is an integral basis, it suffices to show that given any $i$ with $1 \leq i \leq \frac{(p-1)p^{n-1}}{2} -1$ we can write $w^{\frac{(p-1)p^{n-1}}{2} + i}$ in terms of $B$.
Now from the minimal polynomial for $w$, if we substitute in $w$ and take complex conjugates we get that
$w^{-\left(\frac{(p-1)p^{n-1}}{2} + i\right)} = - \sum_{k=1}^{p-1} w^{\frac{p-1 - 2k}{2}p^{n-1} + i}$
I thought that from here we can say given any $i$, the exponents of $w$ in the sum on the right always have absolute value less than or equal to $\frac{(p-1)p^{n-1}}{2}$ but unfortunately this is not true.
Showing that $A$ and $B$ have the same discriminants seems inaccessible and I am stuck here.
Edit: I just realised it suffices to find an element of $\textrm{Gal}(\Bbb{Q}(w)/\Bbb{Q})$ that takes $A$ to $B$, from trying out simple cases I think that element of the Galois group is given by complex conjugation.