Who to ask for letters of recommendations?
You want the letters that can say the most about you beyond how you did in a class (that's in your record) even if their expertise is not the closest to the mathematics you want to do in grad school.
That suggests your thesis advisor, and #1.
I would hope that your ambition to go for the math PhD would appeal to #4 even though acceptance would mean they wouldn't have you for a master's student.
Related: Postdoc Letter of recommendation same school or different school