Mock AIME 1 2006-2007 Problems/Problem 5
Modified Problem
For a prime number , define the function
as follows:
If there exists
,
, such that
set . Otherwise, set
. Compute the sum
.
Original Problem
Let be a prime and
satisfy
for all integers
.
is the greatest integer less than or equal to
. If for fixed
, there exists an integer
such that:
then . If there is no such
, then
. If
, find the sum:
.
Solution
The definition of is equivalent to the following: "If
has a multiplicative inverse mod
,
is the member of the set
such that
. Otherwise,
."
Note that this really gives a well-defined function because that set includes exactly one member from each congruence class modulo , and each invertible element has inverses in only one such class.
From this point onwards, it's clear: as cycles through
,
also cycles through the same values in some order. We cover those values 11 times. Thus the answer is
.