6=1+2+36=21⋅(22−1)28=1+2+4+7+1428=22⋅(23−1)
6 and 28 are perfect numbers, because each of them is equal to the sum of its proper divisors, as shown above. They are also numbers of the form 2n⋅(2n+1−1).
Not all numbers of the form 2n⋅(2n+1−1) are perfect numbers. Let's call those numbers imperfect. For instance, 120 is an imperfect number because
120=23⋅(24−1)
yet
120=1+2+3+4+5+6+8+10+12+15+20+24+30+40+60.
What is the smallest imperfect number greater than 120?