I think one major difference is that programming languages are mostly imperative while mathematical statements are more declarative. When you're solving a mathematical equation, you are typically given a statement which you need to transform into another form. How you do that is less important than proving that the alternate form is valid given the equation. You declare the problem and the solution you want to solve for first, and there may be multiple ways to get there, you just need to show a valid way.