Does studying mathematics or science lead to a practitioner of Buddhism acquiring wrong philosophical views and mental afflictions?
If you are looking for enlightenment you should be concerned of not being attached to these studies, or averse to what you disagree. The same fits to Buddhism itself, you should't become absorbed, or obsessed, to the Dharma.

All philosophies are mental phenomena, they aren't either good or bad in themselves. But they can hinder your search for enlightenment if you are too concerned about them.

Math and science share a side of problem elaboration and solving. So it would contradict Buddhism if you enjoy or think it is meaningful to be worried about all those problems. Over-thinking about anything and having a heavy attitude over theories or facts are opposite to the practice of meditation.

The point of meditation is to not being absorbed to mental elaborations. So there is no sense to think all over a sitting session. Then this extends to daily life, there is no sense to have a sharp and clear mind when meditating and daydream in the rest of the time.

For short, the point isn't what phenomena you engage, but it's how you engage to phenomena. If you can elaborate on any philosophy in a detached way it wouldn't be a problem at all. So the practice would be to think while being present and aware. (yes, this one is quite paradoxical)