Problem

Source: Iran 3rd round 2011-number theory exam-p6

Tags: function, number theory proposed, number theory



$a$ is an integer and $p$ is a prime number and we have $p\ge 17$. Suppose that $S=\{1,2,....,p-1\}$ and $T=\{y|1\le y\le p-1,ord_p(y)<p-1\}$. Prove that there are at least $4(p-3)(p-1)^{p-4}$ functions $f:S\longrightarrow S$ satisfying $\sum_{x\in T} x^{f(x)}\equiv a$ $(mod$ $p)$. proposed by Mahyar Sefidgaran