Skip to main content
OlympiadHQ

Browse · MathNet

Print

Brazilian Math Olympiad

Brazil counting and probability

Problem

Let be a positive integer and a subset of , the set of the integers modulo , define , where . Define .

a. Prove that .

b. Prove that for infinite values of .
Solution
a. Let . Consider the sum Now each element appears in a set times: choose for each . So and the average of is Since is above average, there is a such that is below average, so So .

b. Let be a prime, and set We have to show that Since this is clear for , we henceforth assume that . From now on, all equalities are in , that is, taken modulo .

We have that if and only if there exists such that \begin{array}{l@{\quad \Longleftrightarrow \quad}l} x^2 = y^2 + t & (x-y)(x+y) = t \\[1.5ex] \left| \begin{array}{l} x-y=u \\ x+y=u^{-1}t \end{array} \right. & \text{for some } u \in F_p^{\times} \\[1.5ex] \left| \begin{array}{l} x = \displaystyle\frac{u+u^{-1}t}{2} \\ y = \displaystyle\frac{u^{-1}t-u}{2} \end{array} \right. & \text{for some } u \in F_p^{\times} \end{array}

with and , that is,



On the other hand, if , Hence, as runs over the non-zero quadratic residues, with exception of , we obtain each twice (observe that the case is excluded since ). Therefore

Techniques

Counting two waysInverses mod nQuadratic residues