Almost perfect numbers A positive integer $n$ is called almost perfect if the sum of its divisors smaller than $n$ is $n-1$. What are all almost perfect numbers $n$ such that some power $n^k$ is also almost perfect for at least one $k>1$?
Source: St. Petersburg Olympiad 2014
 A: Let $s(n)$ denote the sum of positive divisors of $n$, itself excluded. Observe that $n^k-1=(n-1)(n^{k-1}+n^{k-2}+\cdots+1)$. This means if $n$ is almost perfect and so is $n^k$, then $$s(n^k)=n^k-1=s(n)(n^{k-1}+n^{k-2}+\cdots+1).$$
We'll prove that in general, $s(n)(n^{k-1}+n^{k-2}+\cdots+1)<s(n^k)$. Let $d_1,\ldots,d_{m}$ be the positive divisors of $n$, less than $n$. Every $d_in^j$ is a divisor of $n^k$. Moreover, all $d_in^j$ are different for distinct choices of $i$ and/or $j$. Consequently,
$$s(n)(n^{k-1}+n^{k-2}+\cdots+1)\leqslant s(n^k).$$
When does equality occur? Not too often, it turns out:
Suppose $n$ has at least two prime divisors, say $p$ and $q$, with corresponding multiplicities $a$ and $b$. $d=p^{2a}$ is a divisor of $n^k$, but is it also of the form $d_in^j$? No, it isn't: clearly $n\mid d$ is impossible, and so is $d=d_i$. Hence $d$ would be a divisor of $n^k$ not occuring in $s(n)(n^{k-1}+n^{k-2}+\cdots+1)$, and the inequality is strict.
The only case left is where $n$ is a prime power. Note that $s(p^a)=\frac{p^a-1}{p-1}\leqslant p^a-1$, with equality only if $n=2$. So the only case left is where $n$ is a power of $2$, and you may note that for every $k\geqslant0$, $s(2^k)=2^k-1$, which means all powers of $2$ indeed satisfy the desired property.
A: Hint:  Powers of $2$ are almost perfect.
