f=lambda n:[int(bin(i+2**n)[:1:-1],2)//2for i in range(2**n)]
for n in (0,1,2,3):
print(f(n))
Zj1sYW1iZGEgbjpbaW50KGJpbihpKzIqKm4pWzoxOi0xXSwyKS8vMmZvciBpIGluIHJhbmdlKDIqKm4pXQpmb3IgbiBpbiAoMCwxLDIsMyk6CglwcmludChmKG4pKQ==
[0]
[0, 1]
[0, 2, 1, 3]
[0, 4, 2, 6, 1, 5, 3, 7]