Sorry, a formula and an algorithm are not at all different.
A mathematical formula is just a symbolic expression of an abstract concept, with the procedure (algorithm) how to use it being implicit (= obvious to the person skilled in the art).
A computer algorithm can be trivially converted into purely mathematical/logic representation ("formulas" if you want), e.g. using things like lambda calculus. And vice-versa - an abstract mathematical problem formulation can be converted into an algorithm (assuming the solution is known).
If you start patenting algorithms, you are patenting math.
A mathematical formula is just a symbolic expression of an abstract concept, with the procedure (algorithm) how to use it being implicit (= obvious to the person skilled in the art).
A computer algorithm can be trivially converted into purely mathematical/logic representation ("formulas" if you want), e.g. using things like lambda calculus. And vice-versa - an abstract mathematical problem formulation can be converted into an algorithm (assuming the solution is known).
If you start patenting algorithms, you are patenting math.