Determinant of a specific circulant matrix, $A_n$ Let
$$A_2 = \left[ \begin{array}{cc} 0 & 1\\ 1 & 0 \end{array}\right]$$
$$A_3 = \left[ \begin{array}{ccc} 0 & 1 & 1\\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{array}\right]$$
$$A_4 = \left[ \begin{array}{cccc} 0 & 1 & 1 & 1\\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0\end{array}\right]$$
and so on for $A_n$.
I was asked to calculate the determinant for $A_1, A_2, A_3, A_4$ and then guess about the determinant for $A_n$ in general. Of course the pattern is clear that
$$ \det A_n = (n-1)(-1)^{n-1} $$
but I was wondering as to what the proof of this is. I tried to be clever with cofactor expansions but I couldn't get anywhere.
Could someone explain it to me please?

The determinant of a general circulant matrix is given by 
 \begin{eqnarray*} 
       \left|    \begin{array} {ccccc}
       x_0 & x_{n-1}  & \cdots & x_2 &x_1 \\ 
       x_1 & x_0  &\cdots & x_3 & x_2\\
       x_2 & x_1 & \cdots & x_4& x_3 \\
       \vdots & \vdots & ~ & \vdots & \vdots \\
        x_{n-2} & x_{n-3}  &\cdots &x_0 & x_{n-1} \\
        x_{n-1} & x_{n-2}  &\cdots &x_1 & x_0  \end{array} \right|
        = \prod_{p=0}^{n-1} \left( x_0 + \omega^p x_1  +\cdots + \omega^{(n-1)p}x_{n-1} \right)
       \end{eqnarray*} 
where $\omega = e^{2 \pi i /n} $ is an $n$th root of unity; it satisfies the identity $ \sum_{q=1}^{n-1} \omega^{qd}  = -1 $ for 
$d \neq 0$.  So
 \begin{eqnarray*} 
       \left|    \begin{array} {ccccc}
       0 & 1 & \cdots & 1 &1 \\ 
       1 & 0  &\cdots & 1 & 1\\
       1 & 1 & \cdots & 1& 1 \\
       \vdots & \vdots & ~ & \vdots & \vdots \\
        1 & 1  &\cdots & 0 & 1\\
        1 & 1  &\cdots & 1 & 0  \end{array} \right|
             = (0+1+\cdots +1) \prod_{p=1}^{n-1} \left(  \omega^p   +\cdots + \omega^{(n-1)p} \right)= (n-1)\prod_{p=1}^{n-1} (-1)= (n-1)(-1)^{n-1}
       \end{eqnarray*} 
