Number of ways to make a bracelet with n beads and m colors I was solving a problem on the Art of Problem Solving website that was posed like this:
How many ways can the $7$ spokes of a wheel be painted such that each spoke can be either red, green, or blue?
Another user and I were solving the problem together, and it turns out the answer is $315$. If we list the $7$ spokes in some order, there are $3^7 $ ways of coloring each spoke. Subtracting the three combinations where all the spokes are the same color, we get $3^7-3$. To remove the duplicates (combinations that are indistinguishable under the rotation of the wheel), divide by $7$ because each of the remaining combinations are a duplicate of $6$ others. Finally add the three combinations where all the spokes are the same color to get $\frac{3^7-3}{7}+3 = 315$.
My question is, is it possible to generalize this problem for $n$ spokes and $m$ colors? I realize that if $n$ is prime, then the formula is $\frac{m^n-m}{n}+m$.
Please excuse the terrible wording and explanation. Those are not my strong points. If you need more clarification, feel free to ask in the comments.
Thanks,
The Turtle
 A: The answer to your question is: Yes! It is possible to generalize this to $n$ spokes and $m$ colors. 
This type of coloring problem, where colorings are considered the same if they are symmetric to one another (via rotation, reflection, etc), can be solved generally using Polya's Enumeration Theorem. Here is a link to the Wikipedia article if you are interested.
Basically what it does is provides a method for finding the number of equivalent $m$-colorings of $n$ objects under any desired group of symmetries $G$ acting on the $n$ objects. In the spokes/necklace/bracelet problem you mentioned the relevant group would be the cyclic group $C_n$ acting on $n$ spokes. Without going into all the details, Polya's Enumeration Theorem gives the following general formula for the number of $m$-colorings of $n$ spokes:
$$\frac{1}{n} \sum_{d|n} \phi(d)m^{n/d} $$  
where $\phi$ denotes the Euler totient function and the sum is over positive integer divisors $d$ of $n$. 
So to work your example using this formula, we have $m=3$ and $n=7$. The formula gives: 
$$\frac{1}{7} \sum_{d|7} \phi(d)3^{7/d} = \frac{1}{7}(3^7+6\cdot 3^1)=\frac{2205}{7}=315$$
