Want to learn techniques of divisibility in polynomial

65 Views Asked by At

A question from Romania Imo TST Let $p$ be a prime number and $f\in \mathbb{Z}[X]$ given by $$f(x) = a_{p-1}x^{p-2} + a_{p-2}x^{p-3} + \cdots + a_2x+ a_1 ,$$where $a_i = \left( \tfrac ip\right)$ is the Legendre symbol of $i$ with respect to $p$ (i.e. $a_i=1$ if $ i^{\frac {p-1}2} \equiv 1 \pmod p$ and $a_i=-1$ otherwise, for all $i=1,2,\ldots,p-1$).

a) Prove that $f(x)$ is divisible with $(x-1)$, but not with $(x-1)^2$ iff $p \equiv 3 \pmod 4$;

b) Prove that if $p\equiv 5 \pmod 8$ then $f(x)$ is divisible with $(x-1)^2$ but not with $(x-1)^3$.

I have seen some solutions. They have used some techniques such as checking $\sum_{i=1}^{p-1} i \left ( \frac{i}{p} \right )$ or using statement like $(x-1) \nmid (xP'(x))'$, an someone please help me understanding these techniques?