Problem

Source: Iran TST2 Day1 P1

Tags: polynomial, number theory, Iranian TST



We call a monic polynomial $P(x) \in \mathbb{Z}[x]$ square-free mod n if there dose not exist polynomials $Q(x),R(x) \in \mathbb{Z}[x]$ with $Q$ being non-constant and $P(x) \equiv Q(x)^2 R(x) \mod n$. Given a prime $p$ and integer $m \geq 2$. Find the number of monic square-free mod p $P(x)$ with degree $m$ and coeeficients in $\{0,1,2,3,...,p-1\}$. Proposed by Masud Shafaie