# How many ways are there of coloring $n$ numbers? [duplicate]

Possible Duplicate:
In how many ways can we colour $n$ baskets with $r$ colours?

How many ways are there of coloring $n$ numbers $1, 2, 3, \dots, n$ ($n \ge 2$) in a circle $(C)$ with $p$ colors ($p \ge 2$), such that each number is given one color, and every color isn't used for two adjacent number? Thanks!

## marked as duplicate by joriki, Phira, Thomas, Brian M. Scott, EmilyNov 5 '12 at 17:12

• It is going to be something like $p(p-1)^{n-1}(p-2)$, but for example already for $p=2$ it is not that straightforward (depends also on parity of $n$). – Berci Nov 5 '12 at 16:03