How to find all the solutions for $\sum\limits_{i=1}^{n} \frac{1}{2^{k_i}}= 1$ for $k_i\in \Bbb{N}$ and $n$ a fixed positive integer?

163 Views Asked by At

I got curious with the following: How can I find all the solutions for

$$\frac{1}{2^{k_1}} + \frac{1}{2^{k_2}} + \frac{1}{2^{k_3}} + \dots + \frac{1}{2^{k_n}}=1$$

for $k_i\in \Bbb{N}$ with $n$ a fixed positive integer? I thought about multiplying both sides by $2^{k_1} 2^{k_2}\dots 2^{k_n}$ but it looked useless at first sight. Is there some algorithm for that? Sorry if the question is too trivial, but I spent a while thinking and nothing came to my mind.

EDIT: I'm not sure this is actually number theory. Feel free to add or remove tags if it isn't.

1

There are 1 best solutions below

2
On

This image shows how to generate iteratively all solutions $(k_1, \dots, k_n)$ for all $n$, under the constraint $k_1 \le \dots \le k_n$.

enter image description here

The "sons" of every solution $(k_1, \dots , k_i, k_{i+1} \dots , k_n)$ are found by replacing $k_i$ with $(k_i+1, k_i+1)$ (under the constraint that $k_i < k_{i+1}$).