Solution to Show that every nonzero integer can be uniquely expressed as ak3^k + ak−13^(k−1) + · … - Sikademy

Nov. 27, 2020

Archangel Macsika Sikademy Image

Archangel Macsika

Show that every nonzero integer can be uniquely expressed as ak3^k + ak−13^(k−1) + · · · + a13 + a0 where ai ∈ {−1, 0, 1} and ak ≠ 0.

Solution for Show that every nonzero integer can be uniquely expressed as ak3k + ak-13k-1 + · · · + a13 + a0 where ai ∈ {−1, 0, 1} and ak ≠ 0.

n This follows from the Division algorithm upon noting that if, after dividing n by 3, we obtain a remainder of 2, we may write

n = 3k + 2 = 3(k + 1) − 1

If you would like to see a different solution or an implementation in a different programming language Kindly let us know