This might be dumb of me not to understand... or it might not be... umm... anyway, is it 2^(N-1) or (2^N) - 1?
If it's 2^(N-1), then the solution is all powers of two.
For 2^(N-1) to be divisible by N, N must have a prime factorization of only 2s (as 2^anything has only 2s).
It is easy to see that
2^((2^0)-1)/2^0 = 1
2^((2^1)-1)/2^1 = 1
2^((2^2)-1)/2^2 = 2
2^((2^3)-1)/2^3 = 16
and so on... but this seems pretty easy, which leads me to suspect that it's (2^N) - 1
Because (2^N) - 1 is odd, all even numbers can be ruled out.
|
Posted by Joe Ruby
on 2004-12-12 05:03:05 |