Bosnia and Herzegovina 2022 IMO TST P2
Source:
May 22, 2022
number theoryprime numbers
Problem Statement
Let be an odd prime number. Around a circular table, students sit. We give 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 th turn we skip students and give the next student a piece of candy. We do this until we don't give out all pieces of candy.
How many students won't get any pieces of candy?
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?