Skip to main content
2 of 3
added 27 characters in body
Peach
  • 13
  • 3

Powers of two with coefficients {1,−1}

Given a vector $(n_0, n_1, \dots, n_l)$ where $n_i \in \{-1, 1\}$, $i = \overline{0, l-1}, n_l = 1$ and $l \in \mathbb{N}$.
Prove that for all $a$ such that $$0 < a \leq 2^0\cdot n_0 + 2^1 \cdot n_1 + \dots + 2^{l - 1} \cdot n_{l - 1} + 2^l \cdot n_l$$

there are distinct $k_0, k_1, \dots, k_r \in I = \{0, 1, \dots, l\}$ where $r \leq l$ such that

$$a = n_{k_0} \cdot 2^{k_0} + n_{k_1} \cdot 2^{k_1} + \dots + n_{k_r} \cdot 2^{k_r}\;.$$

Any help is appreciated.

Peach
  • 13
  • 3