![Programming Puzzles & Code Golf](http://cdn.sstatic.net/codegolf/img/apple-touch-icon.png)
C, 109 bytes
main(int a,char**b){for(long i=0,x;++i<1L<<atol(b[1]);){x=i>>(ffs(i)-1);if(x>>(ffs(~x)-1))printf("%ld,",i);}}
Ungolfed:
main(int a,char**b) {
for(long i = 0; ++i < 1 << atol(b[1]);) {
x = i >> (ffsl(i) - 1);
if (x >> (ffsl(~x) - 1))
printf("%ld,",i);
}
}
The fun...