IMO 1983 LL BRA12

The number 0 or 1 is to be assigned to each of the n vertices

IMO 1983 LL BRA12

Origin: BRA

Problem

The number 0 or 1 is to be assigned to each of the n vertices of a regular polygon. In how many different ways can this be done (if we consider two assignments that can be obtained one from the other through rotation in the plane of the polygon to be identical)?