The application of math in music is an interesting concept with a long history. Rather than bore you with it, let me suggest Wolfram Tones as a primer.
This website has a number of generators that let you create music. It's done by the people behind Mathematica. One cool feature is that once you've found or made a composition you like, you can send it to yourself as ringtone.