Well, I would argue mathematics is not a science, but I would also argue mathematics falls so completely outside the domain of science it's not a pseudoscience either. I'm actually a mathematical realist which I believe is an unpopular opinion so I'm not saying mathematics is OK because it's a game, has pragmatic results, etc. but mathematics is much more epistemologically fundamental than the scientific method in the same way sense perception, logic, intuition, etc. are more fundamental and also valid forms of knowledge.