Automorphic functions and number theory