def j(n): if n == 1: return 1 if n % 2 == 0 : return 2 * j(n/2) - 1 else: return 2 * j((n-1)/2) + 1 for i in range(1,33): print(f'{i} : {j(i)}')