You paint the vertices of a regular n-gon with k colors. You do not have to use every color.
Two paintings count as one and the same case when a finite number of the following operations turns one into the other.
- Rotate the polygon.
- Flip the polygon over.
- Pick two different colors X and Y, repaint every vertex of color X with color Y, and repaint every vertex of color Y with color X. It is allowed that no vertex has color X or color Y.
Count how many different paintings there are.