One example is Sidney Coleman, though he was a theoretical physicist and not a mathematician. In an interview, he said:
I hate [teaching]. You do it as part of the job. Well, that's of course false ... or maybe more true than false when I say I hate it. ... But I certainly would be just as happy if I had no graduate students. ... Occasionally there is a graduate student who is a joy to collaborate with. Both David Politzer and Erick Weinberg were of this kind, but they were essentially almost mature physicists. They were very bright by the time they came to me. In general, working with a graduate student is like teaching a course. It's tedious, unpleasant work. A pain in the neck. You do it because you're paid to do it. If I weren't paid to do it I certainly would never do it.2
Interview of Sidney Coleman by Katherine Sopka on 1977 January 18,
Niels Bohr Library & Archives, American Institute of Physics,
College Park, MD USA,
www.aip.org/history-programs/niels-bohr-library/oral-histories/31234