import math def num_split(x, n): p = 2 while def calc(k): for n in range(3, int(math.log2(k)) + 2): m = k - n print(n, m, 2 ** n, 2 * k) calc(9)