divide by two if it's an odd number
multiply by any odd number then add one
(the key is that you're adding 1, and that will inevitably reach a point whereby the number is 2 raised to some power)
More information about formatting options
Shouldn't it work for other sequences?
divide by two if it's an odd number
multiply by any odd number then add one
(the key is that you're adding 1, and that will inevitably reach a point whereby the number is 2 raised to some power)