Splitting polynomials I have a polynomial ${\frac{{{{({z^2})}^p} \pm {p^p}}}{{{z^2} \pm p}}}$ where $p$ is an odd prime number, and I know it splits into two factors $$ \sum_{i = 0}^{p - 1} a_i z^i \text{ and } \sum_{i = 0}^{p - 1} ( - 1)^i  a_i z^i $$
For example, when $p=5$
$$
\begin{eqnarray*}
\frac{x^{10}-5^5}{x^2-5} &=& x^8+5x^6+25x^4+125x^2+625\\  
&=& (x^4 + 5x^3+15x^2+25x+25)(x^4-5x^3+15x^2-25x+25)
\end{eqnarray*}
$$
Does anyone know a nice method for determining these two factoring polynomials? 
 A: Here is the solution I found, which to me is unsatisfactory.
This solution uses Table 24 from Riesel’s “Prime Numbers and Computer Methods for Factorization”. Look up the number you are interested in in the n column, and note down the two sets of coefficients given there: they are $U_n(x)$ and $V_n(x)$. Multiply each coefficient in $U_n(x)$ by $p^0$, $p^1$, $p^2$, …, $p^{p-1}$, and those in $V_n(x)$ by $p^1$, $p^2$, … $p^{p-1}$. Then take a coefficient from each list alternately and you have your factor. Do the same for the other factor after multiplying $V_n(x)$ by $-1$.
Example for $p=11$:
$U_n(x)=1, 5, -1, -1, 5, 1$
$V_n(x)=1, 1, -1, 1, 1$
Multiplying by powers of $11$:
$U_n = 1, 55, -121, -1331, 73205, 161051\\
V_n = 11, 121, -1331, 14641, 161051$
Taking the coefficients one at a time from each list one factor is
$$x^{10} + 11x^9 +55x^8 +121x^7 -121x^6 -1331x^5 -1331x^4 +14641x^3 +73205x^2 +161051x +161051$$
and the other factor is
$$x^{10} - 11x^9 +55x^8 -121x^7 -121x^6 +1331x^5 -1331x^4 -14641x^3 +73205x^2 -161051x +161051$$
A: Here is a follow-up from my comment, but unfortunately it does not work. Since it is too long for a comment, I leave it here as an answer.
Set $z=\lambda x$, where $\lambda= \sqrt{p}$ for convenience. Then your polynomials are $p^{p-1}\dfrac{(x^2)^p\pm1}{x^2\pm1}$. 
Now $(x^2)^p-1=x^{2p}-1=\Phi_{2p}(x)\Phi_p(x)\Phi_2(x)\Phi_1(x)=\Phi_p(-x)\Phi_p(x)(x^2-1)$, where $\Phi_n$ is the $n$-th cyclotomic polynomial.
Then $p^{p-1}\dfrac{((x^2)^p-1)}{x^2-1}=\lambda^{2p-2}\Phi_p(-x)\Phi_p(x)=(\lambda^{p-1}\Phi_p(-x))(\lambda^{p-1}\Phi_p(x))=Q(-z)Q(z)$, where $Q(z)=\lambda^{p-1}\Phi_p(x)=\lambda^{p-1}\Phi_p(z/\lambda)$.
This is the correct form from the original observations. Unfortunately, $Q$ does not have integer coefficients. The factorization obtained for the case $p=5$ does not come from this one. And there goes my idea...
Edit: I've now found that all this is discussed on page 6 of these notes by Paul Garrett. I think this is the best answer to the question.
