TITLE: A rational matrix such that $A^{2017}=I_n$
QUESTION [5 upvotes]: Let $A \in \mathcal{M}_{n}(\mathbb{Q})$ such that $A^{2017}=I_n$. Is it always true that $$A=I_n?$$

When $n \leq 2015$, I proved that this result must hold using the minimal polynomial and the fact that $2017$ is prime. I suspect that when $n \geq 2016$, this equality is not always true, but I can't find any matrix other than $I_n$ with that property, which also has only rational entries.
I also thought of an approach with eigenvalues, but since they are all complex roots of $2017$, I am not sure how to make use of them here.

REPLY [5 votes]: Take a companion matrix for the polynomial $x^{2016}+x^{2015}+\cdots+x+1$.
It is in $M_{2016}(\Bbb Z)$ and satisfies $A^{2017}=I$.