Using calculus to do number theory