However, as a seasoned programmer, I've rarely come into situations where I actually need to remember any complicated mathematical formulae or do any extensive calculations. More often, I just need to understand the concepts behind the math, google for the formula I need, and apply it in my code.
Programming is almost exclusively based on logic, so it helps a lot to have a knack for logical thinking (which is closely related to math in general). That said, again and again I've seen feelers and people with more focus on rote memory do well in this field. It also helps tremendously to have dynamic memory, in the sense of being able to assimilate lots of information in a short time, paying extreme attention to relations between relevant details, and then forget all but the essential principles and some nuggets of information to help you locate the details if you need them again - sort of like the swapping that happens in a multitasking computer's memory management system. But the most important trait of them all, I think, is to have a shitload of patience, as every nontrivial programming project tends to involve a lot of frustration.