[Math] Proof that base -2 with binary digits can form every integer

elementary-number-theoryinductionnumber-systems

Basically the question is proving that you can create all integers with binary but instead using $-2$ as the base to be able to create negative integers.

Exact question:

Prove that every integer (positive, negative, or zero) can be written as the sum of distinct powers of $−2$.

I somewhat get how you can induct upon increasing powers for $2^0+2^1+2^2$ etc and prove that it will always hold for the next number but I'm not sure how this will work with negative integers since If I induct upwards I can't go down and I can't start at $-\infty$.

Best Answer

$0$ is obtained via the empty set.

We'll proceed by "simultaneous induction" on the positive and negative integers.

To build up positive base cases we note that $$1=(-2)^0\quad \quad 2=(-2)^2+(-2)^1\quad \quad 3= (-2)^2+(-2)^1+(-2)^0$$

To build up negative base cases we note that $$-1=(-2)^1+(-2)^0\quad \quad -2=(-2)^1\quad \quad -3=(-2)^3+(-2)^2+(-2)^0$$

Now the induction statement we want is "Given that the claim is true for all integers $k$ with $|k|≤n-1$ prove that it is also true for $k=\pm n$."

That plus the base cases will certainly suffice.

To prove the statement, we first note that (using the base cases) we can assume that $n≥4$. Now we distinguish between the cases $n$ even or $n$ odd.

If $n$ is even then $\frac n{-2}$ is an integer with absolute value $<n$ so we can write $$\frac n{-2}=\sum_{i=1}^m(-2)^{a_i}\implies n=\sum_{i=1}^m(-2)^{a_i+1}$$

(here, of course, we are using a proper representation of the smaller number. Thus the $\{a_i\}$ are distinct. If that is the case, then of course the numbers $\{a_i+1\}$ are also all distinct.)

If $n$ is odd then $n-1$ is even and, as before we can write $$\frac {n-1}{-2}=\sum_{i=1}^m(-2)^{a_i}\implies n=\sum_{i=1}^m(-2)^{a_i+1}+(-2)^0$$ and we are done.

The case of $-n$ is more or less identical.

Note that this method is "constructive" in the sense that you can use it to construct the representation of some number, given that you have already got the representations of smaller numbers.

Related Question