Python 3, 120 114 bytes
def f(n,k=0):
while~n:
k+=1
try:r=eval(bin(k).translate({48:'],',49:'['})[3:-1])+[];n-=1
except:0
print(r)
Test it on Ideone.
2 of 3 | added 10 characters in body | ||||
Python 3,
|