Problem

Source: Romanian IMO Team Selection Test TST 2004, problem 18

Tags: modular arithmetic, quadratics, number theory proposed, number theory



Let p be a prime number and fZ[X] given by f(x)=ap1xp2+ap2xp3++a2x+a1,where ai=(ip) is the Legendre symbol of i with respect to p (i.e. ai=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. Sugested by Calin Popescu.