The algorithm cannot be patented, a specific use for it can. Which on cutting edge math may not exist for decades or even hundreds of years.