I am really having trouble working a problem in my course. I will post it and then add what I have thought etc.
Let p be an odd prime, then using the Euclidian Algorithm, calculated the GCD of of $x^{p-1}-1$ and $x^2+1$ in $\mathbb{Z} / p\mathbb{Z}[x]$
Also, how does $p=1 (mod4)$ tell us that $-1$ is a square in $\mathbb{Z} / p\mathbb{Z}$, infact that $-1$ is a square here if and only if $p=1(mod4)$.
My thoughts:
I know that $$x^{p}-x=(x)(x-1)(x-2)…(x-(p-1))$$ and so that in this sense our roots will be the congruence classes of $1,2,…p-1$
and also that $$x^{p-1}-1=(x-1)(x-2)…(x-(p-1))$$
But I get lost when trying to apply the EA to these polynomials,
like how can I do it when p is arbitrary?
Preferably id like to be able to understand/see how to do the first part first i.e. using division with residue and then move on to the second part. Any insight/hint or solution to this would be great,
Thank you all
Update:
When I try to do division with residue, I just get
$$x^{p-1}-1=(x^2+1)(x^{p-3}-x^{p-5}+x^{p-7}-x^{p-9}...)$$
for example,
$p=7$
$$(x^{6}-1)=(x^2+1)(x^4-x^2+1)$$
for $p=11$
$$(x^{10}-1)=(x^2+1)(x^{8}-x^{6}+x^{4}-x^{2}+1)$$
which for specific cases tells me that 1 is the gcd, but I dont know how to generalize that for the case with arbitrary prime p.