What does it mean to be a good programmer? If you can solve any problem that's solvable, but your code is impossible for anybody but you to understand, are you a good programmer?
I've seen code written by geniuses that's efficient at solving the problem at hand, but still full of bugs -- basic sorts of bugs like checking for an error then doing nothing about it, double-deletion, resource leakage...
And some of the worst code from an engineering standpoint that I've ever seen, was written by computer science professors.
I think a better implication would be "good at math => good at computer science," but computer science is not the same thing as programming.
Logical thinking is the key. Math requires it... so does programming. So that's the common link. But one does not imply or require the other.
I've seen chemical engineers and atomic scientists be terrible programmers. I'm sure they're smart in their fields but they couldn't create algorithms. Perhaps their disciplines do not require that kind of logical reasoning.
Perhaps they got their degrees by being able to learn by rote and they have some fantastic memory retention abilities. But I'm sure they wouldn't mind double integrals with their tea. Whereas my brain started hurting by the end of 1st year university math. Yet I excelled in 3rd year computer science. So there is a disconnect.
Programming (I'm not talking script-kiddie stuff) requires being able to come up with new combinations of functions and data types which aren't obvious from the stated problem or even the desired solutions. Directly. It is the ability to generate a chain of intermediate steps, of some arbitrary length... until the problem is done.
I think the question is too broad. "Math" is an unknown. I'm sure there are some branches of math that overlap the same areas of the brain as does programming. But certainly not all math.
I think a more interesting question might be: "Can an accomplished programmer be good at other tasks? Such as taking apart an engine, fixing house-wiring? Putting up drywall? Once they are shown how once or twice?" I think the answer is YES. In my opinion programmers have that inherent ability to apply logical thinking and keen observation in every-day situations. No they won't do those other tasks as well (business wise) as a veteran mechanic, but they will do them meticulously and likely with better quality.... and take 10x as long. Hence not be able to make money on that.
The same can't be said for most other disciplines trying to come over to programming as an afterthought.
My biased opinion of course.