Solution. Suppose that n=p1s1p2s2…pksk, where p1,…,pk are distinct primes and si⩾1 for each i, and that the sum of all positive divisors of n, which is given by
(1+p1+p12+⋯+p1s1)(1+p2+p22+⋯+p2s2)…(1+pk+pk2+⋯+pksk)
is a perfect power of 2 . Then each of the factors
fi=1+pi+pi2+⋯+pisi
is also a perfect power of 2 greater than 1 and hence both pi and si are odd. Suppose that si>1. In this case we have
fi=(1+pi)(1+pi2+pi4+⋯+pisi−1)
Since fi has no odd divisor greater than 1 , the even integer si−1 (which is supposed to be positive) must be of the form 4k+2 and thus we can make another factorization
fi=(1+pi)(1+pi2)(1+pi4+pi8+⋯+pisi−3)
Consequently, both 1+pi and 1+pi2 are powers of 2 , hence 1+pi∣1+pi2, which contradicts to 1+pi2=(1+pi)(pi−1)+2 (as 1+pi∣2 is impossible). This means that si=1 for each i and thus the number of divisors of n equals 2k.
Note that the above solution can be finished without observing the fact that 1+pi and 1+pi2 cannot be powers of 2 at the same time. Indeed, repeating the procedure of factorization we get finally
fi=(1+pi)(1+pi2)(1+pi4)…(1+pi2i)
hence si=2ti+1−1 with some ti⩾0 for each i and thus the number of divisors of n equals 2k+t1+t2+⋯+tk. (As we know from the original solution, ti=0 for each i.)