This is the problem on USAMTS:
A teacher plays the game “Duck-Goose-Goose” with his class. The game is played as follows: All the students stand in a circle and the teacher walks around the circle. As he passes each student, he taps the student on the head and declares her a ‘duck’ or a ‘goose’. Any student named a ‘goose’ leaves the circle immediately. Starting with the first student, the teacher tags students in the pattern: duck, goose, goose, duck, goose, goose, etc., and continues around the circle (re-tagging some former ducks as geese) until only one student remains. This remaining student is the winner. For instance, if there are $8$ students, the game proceeds as follows: student $1$ (duck), student $2$ (goose), student $3$ (goose), student $4$ (duck), student $5$ (goose), student $6$ (goose), student $7$ (duck), student $8$ (goose), student $1$ (goose), student $4$ (duck), student $7$ (goose) and student $4$ is the winner. Find, with proof, all values of $n$ with $n > 2$ such that if the circle starts with $n$ students, then the $n$ th student is the winner.
I've seen the case for $n=2$ in a Numberphile video which if expressed in base $2,$ just take the first digit and put it on the bottom, also called the Josephus problem.
How can I apply the same logic here?
Currently, I figured out that $3^n$ has position $1$ win every time, so I suspect the pattern still holds, but I can't prove it.