Problem:
There exist r unique nonnegative integers n1​>n2​>⋯>nr​ and r unique integers ak​(1≤k≤r) with each ak​ either 1 or −1 such that
a1​3n1​+a2​3n2​+⋯+ar​3nr​=2008
Find n1​+n2​+⋯+nr​.
Solution:
Every positive integer has a unique base-3 representation, which for 2008 is 22021013​. Note that 2⋅3k=(3+(−1))⋅3k=3k+1+(−1)⋅3k, so that
===​22021013​2⋅36+2⋅35+2⋅33+1⋅32+1⋅30(37+(−1)⋅36)+(36+(−1)⋅35)+(34+(−1)⋅33)+1⋅32+1⋅301⋅37+(−1)⋅35+1⋅34+(−1)⋅33+1⋅32+1⋅30,​
and n1​+n2​+⋯+nr​=7+5+4+3+2+0=21​.
The problems on this page are the property of the MAA's American Mathematics Competitions