Even integer in ternary representation

303 Views Asked by At

Suppose $(d_0,d_1...d_k)_3$ is the ternary representation of a even integer $n$. Show that there is an even number values $d_0...d_k$ that are odd, whenever $n$ is even.

I have tried decomposing different even integers using a (base$*$integer)$+$remainder method, and tried to find a pattern in the remainders. But nothing seemed apparent

i.e: $14$ in ternary is $(112)_3$ has $2$ odd values.

2

There are 2 best solutions below

0
On

Hint: $\displaystyle n =\sum_{i=0}^k 3^id_i \equiv \sum_{i=0}^k d_i \equiv 0 \pmod 2$

0
On

HINT: Suppose that your integer is

$$n=(d_md_{m-1}\ldots d_1d_0)_{\text{three}}=\sum_{k=0}^m3^kd_k\;.$$

$3^k$ is odd for each $k\in\{0,\ldots,m\}$, so the term $3^kd_k$ is odd when $d_k$ is odd, and even when $d_k$ is even. If add up $a$ odd and $b$ even integers, what conditions on $a$ and $b$ make the sum odd? even?