Since we can mathematically demonstrate software to be math, let's take that off the table. Arguing that part is idiotic.
That leaves the patentability of math. Man I wish I had a time machine so I could go back in time and convince Pythagorous to patent his little triangle formula in the context of architecture. I could make a killing.