write a bruteforce solution for N up to 8 or 9

then you'll find out that you don't need k to be at least 2^N and see some interesting patterns.

For example

N=5 : 6 9 11 12 13

N=6 : 11 17 20 22 23 24

And you can find the sequence by searching this website

http://oeis.org Good luck :)