Problem

Source: iran(third round 2003)

Tags: algebra, polynomial, number theory, number theory unsolved



Let $p$ be an odd prime number. Let $S$ be the sum of all primitive roots modulo $p$. Show that if $p-1$ isn't squarefree (i. e., if there exist integers $k$ and $m$ with $k>1$ and $p-1=k^2m$), then $S \equiv 0 \mod p$. If not, then what is $S$ congruent to $\mod p$ ?