You might have fun playing around with this study:
Off hand, the “per capita” lists on the right seem more on point for what you listed.
It is not filtered by “top” PhD programs, and also does not include Philosophy, but I think even so it is at least a useful starting point. I might note for Philosophy, I would really just concentrate on it having a strong culture of undergraduate education and then a decent number of Philosophy majors for a school of its size, which you can check in the NCES College Navigator:
Just looking at the Math list, I for sure think Pomona, Princeton, Chicago, and Carleton would all be great choices. Also Grinnell, Williams, Harvard, Haverford, and Rice.
Those are reachier, though. But in the middle of all that was also Reed (although that is a very specific vibe, they for sure place well into grad schools), St Olaf, and Whitman. I think these are also very good less reachy, but still very academicky, choices. Just skipping around a bit, Amherst and Brown could make a lot of sense for certain kids, but very reachy again. Oberlin is another fairly strong personality school but great for some, more targety than reachy with the right numbers and they have merit. Rochester is also a targety school for high numbers academicky kids, and has decent merit. And so on.
Not surprisingly, the Physics list is not too different. But this being an interest in addition to Math might bump up, say, a Rochester (very strong Physics department doing some cool stuff).
I note I skipped over a lot of STEM-focused colleges that would be good for Math and Physics, but not really where I would recommend for Philosophy. But I note many of those are still very committed to a broad education. I just would not necessarily choose them if I was actually thinking of majoring in Philosophy as a strong possibility.
Edit: Oh, if you are potentially interested in combining Math/Physics AND Philosophy, you might want to have Pitt on your radar, specifically their History and Philosophy of Science program:
Very much world class in this specific area.