Unfortunately, if you spot that pattern then you will not guess the correct generalization. It seems that this may be a puzzle that's easier to solve if you aren't good at spotting easy things.
Well tbh, it seems 2^k-1 does actually match the sequence as far as it is shown. Perhaps there is a proof that n=2^k-1 for the numbers where 2^n is divisible by (n+1). I'll have to see.