ENTP (Ne-Ti-Fe-Si) and INFJ (Ni-Fe-Ti-Se) both have something in common: they are both N-dominant, and both Ti.
Maths requires a lot of step-by-step thinking (Ti). But there are so many paths to travel, and few have the types of answers you are looking for. Many of those roads go nowhere. Many of those roads lead to the same result as you discovered years ago. Many come to something useful, but nothing you can see any use for at the moment, and might not be used for centuries. Many of these roads can take weeks to explore. So you need to be very intuitive, to spot in your mind's eye, which roads are likely to take you somewhere useful, so you don't waste too much time.
So I can see that it can make sense, so say that N-dominance, and high Ti skills would make one very good at mathematics.
However, this is only the maths that is taught today, because it is divorced from real life. In earlier times, mathematics was used to solve real problems. So you had to look at the real world, and take detailed observations (Si). You also had to ensure that there was total agreement on those observations, because if anyone disagreed on any of those observations, then any logic built on it would not apply to them. So you needed to sense how people felt about those observations, and find the ones everyone was happy with (Fe).
Actually, this might explain why I was so obsessed in my 20s, about finding ways to apply maths to real life (INTP = Ti-Ne-Si-Fe).
FYI, I eat up calculus for breakfast, lunch and dinner. Was my favourite, and my best, subject in maths.