Let f(n) = n^2 + 1 if n is odd. Let f(n) = n/2 if n is even.
For how many integers n from 1 to 100, inclusive, does f(f(... f(n)...)) = 1 for some number of applications of f?
All of them!
This is (part of) the Collatz conjecture.
alan i think this is incorrect, the collatz conjecture is for 3n+1 not n^2+1, the only numbers that get to 1 are powers of 2 all other numbers b**w up to infinity