What you are describing is pure mathematics without any particular implementation. Every state (as far as I know) disallows patents for pure mathematics.
For example, such an invention:
would not comply with 35 USC §101 in the US, since unapplied mathematics is probably the only area which everyone agrees is an abstract invention without anything more;...
I'm not an expert in this nor a lawyer. My understanding is you can't patent an abstract mathematical algorithm in its own right. What you might be able to patent is the application of an algorithm to solving a specific problem. This is a bit of a moving target as there have been some recent legal decisions with regards to software patents.
With regards to ...
Theorems are excluded from patentability.
35 U.S.C. 101 Inventions patentable.
Whoever invents or discovers any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof, may obtain a patent therefor, subject to the conditions and requirements of this title.
Maca's answer is excellent and all I have to add is that "laws of nature" are specifically excluded.
Here are some links: