MathDB
Fractional parts

Source: 14th XMO P2

January 14, 2024
number theory

Problem Statement

Let pp be a prime. Define fn(k)f_n(k) to be the number of positive integers 1xp11\leq x\leq p-1 such that ({xp}{kp})({nxp}{kp})<0.\left(\left\{\frac{x}{p}\right\}-\left\{\frac{k}{p}\right\}\right)\left(\left\{\frac{nx}{p}\right\}-\left\{\frac{k}{p}\right\}\right)<0. Let an=fn(12)+fn(32)++fn(2p12)a_n=f_n\left(\frac 12\right)+f_n\left(\frac 32\right)+\dots+f_n\left(\frac{2p-1}{2}\right), find min{a2,a3,,ap1}\min\{a_2, a_3, \dots, a_{p-1}\}.