Logic more so than mathematics. Mathematics as a means to achieve efficiency, which is an afterthought most of the time. Most working programmers don't need more than a basic understanding of algebra.
Also, math and logic are obviously related, but logic is not "a form of mathematics". If anything, mathematics is a form of logic.