Number theory, classical mechanics, and the theory of large atoms