Can you prove or disprove a generalization of Hurwitz's theorem about prime numbers given below?
Theorem.(Hurwitz) Let $F_n(x)$ denote an irreducible factor of degree $\phi(n)$ of $x^n-1$. Then if there exists an integer $q$ such that $F_{p-1}(q)$ is divisible by $p$, $p$ is a prime.
Conjecture.(Generalization of Hurwitz's theorem) Let $F_n^{(a)}(x)$ denote an irreducible factor of degree $\phi(n)$ of $x^n-a^n$ , where $a$ is a positive integer. Let $p$ be a natural number greater than one such that $\operatorname{gcd}(a,p)=1$ . If there exists an integer $q$ such that $F_{p-1}^{(a)}(q) \equiv 0 \pmod{p} $ then $p$ is a prime.
I was searching for counterexample using this PARI/GP code.
This question arose from this answer by Gerry Myerson .
I believe this mostly trivial — since $\gcd(a,p)=1$ then you can 'divide by $a$' modulo $p$. Writing $_aF_n(x)$ for your factor of $x^n-a^n$ and using the existing notation $F_n$ for a factor of $x^n-1$, we have $_aF_n(x)=a^j F_n(x/a)$ where $j$ is the degree of the specific $F_n$. The condition that $_aF_{p-1}(q)\equiv 0$ is then exactly the condition that $F_{p-1}(q/a)\equiv 0\pmod p$.