MathDB
Bosnia and Herzegovina 2022 IMO TST P2

Source:

May 22, 2022
number theoryprime numbers

Problem Statement

Let pp be an odd prime number. Around a circular table, pp students sit. We give pp pieces of candy to those students in the following manner. The first candy we give to an arbitrary student. Then, going around clockwise, we skip two students and give the next student a piece of candy, then we skip 4 students and give another piece of candy to the next student... In general in the kāˆ’k-th turn we skip 2k2k students and give the next student a piece of candy. We do this until we don't give out all pp pieces of candy. a)a) How many students won't get any pieces of candy? b)b) How many pairs of neighboring students (those students who sit next to each other on the table) both got at least a piece of candy?