Diversifying the academic institutions one attends
While this is generally true, it depends heavily on the field and subfield. Pure math is a little unique compared to many other disciplines, and in my experience has a much higher rate of students staying with the same university/department/advisor from undergrad through PhD--perhaps because if you find a professor working on a given topic you'd like to study, there's a decent chance he or she is the only (or one of very few) person in the country doing it. I know a decent number of people in pure math who did this, and at least two of them are now tenured math professors at research universities--so I don't think it's guaranteed to hurt your job prospects. 

I would talk to the professor(s) you're interested in working with and ask for suggestions specific to studying analytic number theory.