Maths Olympiad Prep

Library / Japan competition problems /12 of 38

Japan competition problems, 2007

Combinatorics Difficulty 5.6 AIME, harder Prove it Japan

In how many ways can 100100 be written as a sum of nonnegative powers of 33? (We consider two ways same if they differ only in the order of numbers.)

Solution

Let f(n)f(n) be the number of ways to write nn as sum of nonnegative powers of 33 and f(0)=1f(0) = 1.
We can write nn as sum of nonnegative powers of 33 with kk 11s iff n−kn-k is divisible by 33. Let n−k=3mn-k = 3m, then the number of ways to write nn as sum of nonnegative powers of 33 with kk 11s is equal to write 3m3m as sum of positive powers of 33, and that is equal to f(m)f(m). So we get
f(n)=∑0≤m≤n/3f(m). f(n) = \sum_{0 \le m \le n/3} f(m).
We can compute f(100)f(100) by this relation. First we get f(100)=f(0)+f(1)+⋯+f(33)f(100) = f(0) + f(1) + \cdots + f(33). And from f(0)=f(1)=f(2),f(3)=f(4)=f(5)=f(0)+f(1),⋯ ,f(30)=f(31)=f(32)=f(0)+⋯+f(10),f(33)=f(0)+⋯+f(11)f(0) = f(1) = f(2), f(3) = f(4) = f(5) = f(0) + f(1), \cdots, f(30) = f(31) = f(32) = f(0) + \cdots + f(10), f(33) = f(0) + \cdots + f(11), we get f(100)=34f(0)+31f(1)+⋯+4f(10)+f(11)f(100) = 34f(0) + 31f(1) + \cdots + 4f(10) + f(11). Applying the relation one more time we get
f(100)=(34+31+28)f(0)+(25+22+19)(f(0)+f(1))+(16+13+10)(f(0)+f(1)+f(2))+(7+4+1)(f(0)+f(1)+f(2)+f(3))=210f(0)+117f(1)+51f(2)+12f(3). \begin{aligned} f(100) &= (34 + 31 + 28)f(0) + (25 + 22 + 19)(f(0) + f(1)) \\ &\quad + (16 + 13 + 10)(f(0) + f(1) + f(2)) \\ &\quad + (7 + 4 + 1)(f(0) + f(1) + f(2) + f(3)) \\ &= 210f(0) + 117f(1) + 51f(2) + 12f(3). \end{aligned}
From f(0)=f(1)=f(2)=1f(0) = f(1) = f(2) = 1 and f(3)=2f(3) = 2, we get f(100)=402f(100) = 402.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.