Lance has a regular heptagon (7-sided figure). How many distinct ways can he label the vertices of the heptagon with the letters in OCTAGON if the N cannot be next to an O? Rotations of the same labeling are considered equivalent.
Ignoring the restriction, we can position the letters in 7!/7 = 720 ways because you have to divide by 7 to get rid of the rotations. (Think of it this way, if you order the letters you can move every letter clockwise once, twice, ... 6 times for a total of 7 times(including the original case.))
To deal with the restriction, we do coplementary counting(counting what we do not want.) If you think of O and N as one letter, meaning they are together, then there are only 6 "letters" so 120 ways however, we have to multiply by two because the O can be to the right of N or the left. This gives 240 cases we do not want. Subtracting 240 from 720 is 480.