The thing I still don't understand is whether or not you can prove that you've got a set of generating functions that will cover all numbers that will converge. That's why I took the different approach of starting at the number 1 and applying the algorithm backwards -- if you can cover all cases that can be reached by working from 1 backwards then you know you've covered every number that converges, so any number not on that list can't converge. I just can't come up with an adequate way to show definitively that I've covered all generating functions of the form (n x 2a + 1) x 2b by finding all values of n using the function sqrt(n x 2a + 1) = next value of n In fact I know I'm missing some numbers that do converge, maybe because the generating function behaves strangely at higher values or something, because my approach didn't pick up that 47, 93, and 185 converge using the list of numbers generated in the previous perl program. (Either that or maybe rounding errors are making my computer miss whether it's dealing with integers or not after taking log base 2.) If you want to make a list of numbers that your functions cover, you could compare it to the list of the numbers from 1 to 200 that appear to diverge: 27, 39, 43, 51, 53, 55, 59, 71, 45, 77, 79, 83, 85, 87, 91, 95, 99, 101, 103, 105, 107, 109, 111, 115, 117, 119, 123, 135, 139, 141, 143, 147, 149, 151, 153, 155, 157, 159, 163, 165, 167, 169, 171, 173, 175, 179, 181, 183, 187, 189, 191, 195, 197, 199 and multiples of powers of two for each of those.