Problem

Source: Balkan MO Shortlist 2020 N2

Tags: number theory



A number of $N$ children are at a party and they sit in a circle to play a game of Pass and Parcel. Because the host has no other form of entertainment, the parcel has infinitely many layers. On turn $i$, starting with $i=1$, the following two things happen in order: $(1)$ The parcel is passed $i^2$ positions clockwise; and $(2)$ The child currently holding the parcel unwraps a layer and claims the prize inside. For what values of $N$ will every chidren receive a prize? $Patrick \ Winter \, United \ Kingdom$