An $n \times n$ matrix with rational entries such that $A^{n+1}=I$ I'm working on finding $A \in M_n(\mathbb{Q})$ such that $A^{n+1}=I$. If $n$ is odd, $A=-I$ satisfies the condition. When $n$ is even, clearly it should have eigenvalues $e^{2 \pi ik/(n+1)}(k=1,\cdots ,n)$ as a complex matrix. Now I proved this matrix should be similar to $\begin{pmatrix} R_\theta & 0 & \cdots & 0\\0&R_{2\theta} & \cdots &0\\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & R_{n\theta/2} \end{pmatrix} $, where $R_\theta = \begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}$ and $\theta = \frac{2\pi}{n+1}$. Unfortunately, however, $R_\theta$ is not rational if $n \ge 4$. Is there any other method?

In general, we can take the companion matrix to the polynomial
$$
p(x) = x^n + x^{n-1} + \cdots + 1 = \frac{x^{n+1} - 1}{x - 1}
$$
That is, the matrix $A \in M_n(\Bbb Q)$ given by
$$
A = 
\pmatrix{
0&\cdots& &-1\\
1&0&\cdots&-1\\
&1&\ddots&\vdots \\
&&\ddots&-1
}
$$
will satisfy $A^{n+1} = I$
So, for example, you can verify that
$$
\pmatrix{
0&0&0&-1\\
1&0&0&-1\\
0&1&0&-1\\
0&0&1&-1
}^5 = 
\pmatrix{
1&0&0&0\\
0&1&0&0\\
0&0&1&0\\
0&0&0&1
}
$$
