As I've read and been told, you can never know too much mathematics when you study physics, and I think I read it somewhere here. I have also read that cutting-edge theories like M-Theory need most likely a new the invention of a new type of mathematics to be developed. But my question is, how does number theory relate to physics? I would like to know its direct, or indirect applications, how did the Fermat's Last Theorem proof have possiby contributed to our understanding of the universe? I imagine there is much more to number theory than that, as my knowledge about the subject does not go much further than a bit of modular arithmetics. This is by no means a rant against number theory, I'm only asking it because I am becoming very interested in it, and would like to know more about its pratical usefulness.