Mock AIME 4 2006-2007 Problems/Problem 14

Problem

Let $x$ be the arithmetic mean of all positive integers $k<577$ such that

$k^4\equiv 144\pmod {577}$.

Find the greatest integer less than or equal to $x$.

Solution

We will assume that there is at least one solution, otherwise the answer would be undefined.

Using the binomial theorem it is obvious that $(577-k)^4 \equiv k^4 \pmod {577}$. Thus the solutions come in pairs $\{k,577-k\}$, and hence their average is $\dfrac{577}2 = 288.5$, and the answer is $\boxed{288}$.

(In this case, there are four solutions: $276$, $277$, $300$, and $301$.)