proof - any positive integer can be uniquely expressed as $a = 3^m + 3^{m-1}b_{m-1} + \cdots + 3^0b^0$

440 Views Asked by At

I had been trying to prove that any positive integer can be uniquely expressed as $$a = 3^m + 3^{m-1}b_{m-1} + \cdots + 3^0b^0 \text{ where each b = -1, 0 or 1 and } a \in \mathbb{Z}^+$$ This is a problem from Niven's Introduction to Theory of Numbers.

My Attempt:

Proof by Strong Induction.

Let $P(n) ::= n = 3^m + 3^{m-1}b_{m-1} + \cdots + 3^0b^0 \text{ where each b = -1, 0 or 1 }$.

Base Case: P(1) is true. Since $1 = 3^0$.

Assuming $P(1), P(2), \cdots, P(n-1)$ is true to prove it for $n$.

Considering cases:

Case 1: $n = 3m$ $$\implies n = 3(3^m + 3^{m-1}b_{m-1} + \cdots + 3^0b_0)$$ $$\implies n = 3^{m+1} + 3^{m}b_{m-1} + \cdots + 3^1b_0 + 3_0*0$$

Case 2: $n = 3m+1$ $$\implies n = 3(3^m + 3^{m-1}b_{m-1} + \cdots + 3^0b_0) + 1$$ $$\implies n = 3^{m+1} + 3^{m}b_{m-1} + \cdots + 3^1b_0 + 3_0*1$$

Case 3: $n = 3m-1$ $$\implies n = 3(3^m + 3^{m-1}b_{m-1} + \cdots + 3^0b_0) - 1$$ $$\implies n = 3^{m+1} + 3^{m}b_{m-1} + \cdots + 3^1b_0 + 3^0*(-1)$$

This is how I've managed to prove the above proposition(I am not sure though). Is my proof correct? Please report even the slightest mistake. Also, how can I prove that they are unique.

Could you prove the above proposition in some other way without using induction and by using number theory because I feel I haven't used it? I believe there must be other techniques of proving this by using some number theory concepts.

Thanks.

My question includes proof verification alongwith other questions and it is hence not a duplicate.