MathDB
Card flipping to get all the same

Source: 2015 SDMO High School Problem 2

August 24, 2016

Problem Statement

NN cards are arranged in a circle, with exactly one card face up and the rest face-down. In a turn, choose a proper divisor kk of NN. You may begin at any card on the circle and flip every kk-th card, counting clockwise, if and only if every kk-th card begins the turn in the same orientation (either all face-up or all face-down).
For example, with 1515 cards, you may start at any position and flip the 33rd, 66th, 99th, 1212th, and 1515th cards around the circle if they all begin the turn face up (or all face-down).
For what values of NN can all of the cards be flipped face-up in a finite number of turns?