Alternative integral basis for $\Bbb{Z}[w]$ 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.
 A: Write $n = \varphi(m)/2$. We will write
$$A = \{1,w,\ldots, w^{n-1}\}$$
for the usual integral basis of $\Bbb{Z}[w]$ and
$$B = \{1,w,w^2,\ldots, w^{n/2}, w^{-1},w^{-2},\ldots, w^{1 - \frac{n}{2}}\}$$
\noindent for the collection that we wish to prove is also an integral basis for $\Bbb{Z}[w]$. Now suppose that $w^{-1} = w^{2n-1} + a_{2n-2}w^{2n-2} + \ldots + a_0$ for some $a_i \in \Bbb{Z}$.  Then from this expression we find that 
\begin{eqnarray*} w^{-2} &=& w^{2n-2} + a_{2n-2}w^{2n-3} + \ldots + a_1 + a_0/w\\
&=& a_0w^{2n-1} + (a_0a_{2n-2} + 1)w^{2n-2} + \ldots + a_0^2 + a_1. \end{eqnarray*}
Continuing this process allows us to write down the matrix $M$ that expresses the elements of $B$ in terms of those of $A$, it is the $2n \times 2n$ matrix (with vertical and horizontal lines dividing the matrix into $4$ $n\times n$ blocks)
$$M = \left( \begin{array}{ccccc|ccccc} 1 & 0 & 0 & \ldots & 0 & a_0 & a_0^2 + a_1 & \ldots &&\vdots  \\ 
0 & 1 & 0 & \ldots & 0 & a_1 & a_1a_0 + a_2 & \ldots &&\vdots \\
&\ddots &&& & \vdots & \vdots \\
&&&&  \\
0 &&& \ldots & 1 \\
\hline 
&&&&& \vdots &\vdots& \ldots && \vdots \\
&& &&& a_{2n-4} & a_0a_{2n-4} + a_{2n-3} &\ldots && \vdots \\
&&0 &&& a_{2n-3} & a_0a_{2n-3} + a_{2n-2} & \ldots && \vdots \\
&&&&&a_{2n-2} & a_0a_{2n-2} + 1 & \ldots && \vdots \\
&&&&&1 & a_0 & \ldots && \vdots
\end{array}\right)$$
where the $i$- th column $C_i$ for $i > n $ is defined recursively as  
$$C_i = \begin{cases} C_{n+ 1}, & \text{if} \hspace{1mm} i= n+ 1\\
(b_{1,i-1})C_{i-1} + T(C_{i-1}), & \text{if} \hspace{1mm} i > n + 1.\end{cases}$$
$C_{n + 1}$ is the $(n + 1)$ - th column as displayed in $M$ above, $b_{1,i-1}$ is the integer at position $(1,i-1)$ of $M$ and last $T$ is the \textit{shift operator} defined as follows. If a column $C_{i-1}$ written out as an $n$ - tuple is $C_{i-1} = (c_1^{i-1},\ldots,c_n^{i-1})$ then 
$$T(C_{i-1}) = (0,c_1^{i-1},\ldots, c_{n-1}^{i-1}).$$
It is now clear from this recursive definition of the columns that $M$ is equivalent to the matrix $M'$ that looks like 
$$M' = \left( \begin{array}{ccccc|ccccc} 1 & 0 & 0 & \ldots & 0 & a_0 & a_1 & \ldots &&\vdots  \\ 
0 & 1 & 0 & \ldots & 0 & a_1 &  a_2 & \ldots &&\vdots \\
&\ddots &&& & \vdots & \vdots \\
&&&&  \\
0 &&& \ldots & 1 & a_{n-1} & a_{n-2} &\ldots && \vdots \\
\hline 
&&&&& a_n & a_{n-1} & \ldots && 1 \\
&&&&& \vdots &\vdots& \ldots &{\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu 
\raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}}&  \\
&&0 &&& a_{2n-3} & a_{2n-2} & 1 & \ldots  & \vdots \\
&&&&&a_{2n-2} & 1 & 0& \ldots & \vdots \\
&&&&&1 & 0 & 0 & \ldots & \vdots
\end{array}\right).$$
Now $\det M = \det M'$ which is just the determinant of the lower right block in $M'$. By switching the columns of this lower right block to get it upper triangular we get that up to sign the determinant of $M'$ is $1$. It follows $M$ itself is invertible over $\Bbb{Z}$ completing the proof that the collection $B$ is an integral basis for $\Bbb{Z}[w]$.
