Asking a professor to be my advisor (math)
Just ask. There is nothing to lose. Many of us would be hesitant to ask a student, realizing that there are advantages to moving on and coming in contact with different faculty and their ideas. He might even suggest that you move on, actually, and don't take that as a negative. 

If that happens, ask for his advice on your next steps. And try to keep in touch with him over the next years. An email every year might be welcome if you are progressing nicely. 

These things are best done in person if that is an option. 

But think about whether this prof (the easy option) or moving on is the best option for your future.