Find out why the other programmer left. He left knowing full well that it'd leave the company in the lurch, and that's a pretty bad sign because it means that they've upset him enough that he doesn't care about hurting them.
Giving some basic armchair analysis, I'd assume that the mathematician gets a lot of kudos for his 'genius' inventions, and the programmer is treated like a second-rate code monkey who's just there the aid the oh-so-godly mathematician. If this is the case, then it's obviously not worth joining, but make sure to find out why the other programmer left.