Where are you getting 'orders of magnitude'? and yeah I do think it's reasonable to say that Useful Programming requires more intelligence than the median human, and Solving millenium level math problems certainly requires considerably more intelligence than the median Programmer. What exactly is so absurd or unreasonable about that?
In the same way you could say that beating Gary Kasparov at chess requires more intelligence than the average human and yet we had an AI winter.
Essentially, Humans who tend to have higher verbal skills also tend to have higher spatial skills, better memories, and faster processing speed. Someone with the cognitive ability to become an exceptional chemist might just as easily have become an exceptional mathematician or software engineer (all else being equal).
The knowledge and skills required are obviously different, but the underlying cognitive abilities that make someone successful in one intellectually demanding field often transfer to others.