Express a number as sum of distinct powers of 3
Answers
Answered by
2
Not every positive integer is a sum of powers of 3 without repetiton, for example 7 isn't. if you allow repetitions, you can write every positive integer as a sum of powers of 3, with no power of 3 repeated more than twice ( eg 7 = 1 + 3 + 3). If you know about proof by induction, you can prove it that way. If not, the recipe is to keep subtracting the biggest power of 3 you can (still leaving a non-negative remainder) : For example if n = 173, subtract 81, then subtract 81 again, leaving 11. Then subtract 9, then 1, then 1: so 173 = 81+81+ 9+ 1+ 1.
Similar questions