Maths Olympiad Prep

Library / /320 of 377

Number theory Difficulty 5.6 AIME, harder Prove it United States

Problem:

Given a positive integer nn, a sequence of integers a1,a2,,ara_{1}, a_{2}, \ldots, a_{r}, where 0aik0 \leq a_{i} \leq k for all 1ir1 \leq i \leq r, is said to be a "kk-representation" of nn if there exists an integer cc such that
i=1rai=i=1raikci=n. \sum_{i=1}^{r} a_{i} = \sum_{i=1}^{r} a_{i} k^{c-i} = n.
Prove that every positive integer nn has a kk-representation, and that the kk-representation is unique if and only if 0 does not appear in the base-kk representation of n1n-1.

Solution

Solution:

Equivalently, a kk-representation is given by a sequence ap,,aqa_{p}, \ldots, a_{q}, for some p<qp < q, such that
i=pqai=i=pqaiki. \sum_{i=p}^{q} a_{i} = \sum_{i=p}^{q} a_{i} k^{i}.
We first show existence. Let the representation of n1n-1 in base kk be given by i=0raiki=n1\sum_{i=0}^{r} a_{i} k^{i} = n-1. Let l=i=1rai(ki1+ki2++1)l = \sum_{i=1}^{r} a_{i} (k^{i-1} + k^{i-2} + \cdots + 1). Now we extend the sequence {ai}\{a_{i}\} by letting ai=k1a_{i} = k-1 if l+1i1-l+1 \leq i \leq -1 and al=ka_{-l} = k. We claim that al,,ar1,ara_{-l}, \ldots, a_{r-1}, a_{r} is a kk-representation of nn. Indeed,
i=lraiki=(n1)+(i=l1(k1)ni)+kl=(n1)+(k1)k11kl1k1+kl=ni=lrai=(i=0rai)+l(k1)+1=(i=0rai)+(i=1rai(ki1))+1=(i=0raiki)+1=n \begin{aligned} \sum_{i=-l}^{r} a_{i} k^{i} & = (n-1) + \left( \sum_{i=-l}^{-1} (k-1) n^{i} \right) + k^{-l} \\ & = (n-1) + (k-1) k^{-1} \frac{1 - k^{-l}}{1 - k^{-1}} + k^{-l} = n \\ \sum_{i=-l}^{r} a_{i} & = \left( \sum_{i=0}^{r} a_{i} \right) + l(k-1) + 1 \\ & = \left( \sum_{i=0}^{r} a_{i} \right) + \left( \sum_{i=1}^{r} a_{i} (k^{i} - 1) \right) + 1 \\ & = \left( \sum_{i=0}^{r} a_{i} k^{i} \right) + 1 = n \end{aligned}
Now suppose there is another kk-representation {bi}\{b_{i}\} of nn; then bi=biki=n\sum b_{i} = \sum b_{i} k^{i} = n. This implies that ci=ciki=0\sum c_{i} = \sum c_{i} k^{i} = 0 where ci=aibic_{i} = a_{i} - b_{i}. The following claim specifies all possibilities of {ci}\{c_{i}\}.

Claim: Suppose that i=pqciki=0\sum_{i=p}^{q} c_{i} k^{i} = 0, where ci,p,qZ,p<qc_{i}, p, q \in \mathbb{Z}, p < q, and ci[k,k]c_{i} \in [-k, k]. Then the sequence {ci}\{c_{i}\} must be the concatenation of subsequences of the form
±(1,1k,1k,,1k,k) \pm(1, 1-k, 1-k, \ldots, 1-k, -k)
possibly with 0's in between.

Proof. If cic_{i} is not the zero sequence, then without loss of generality, we may assume cq>0c_{q} > 0.
Since i=pqciki=0\sum_{i=p}^{q} c_{i} k^{i} = 0, we have
cqkq=cq1kq1++cpkpkq+kq1++kp+1<kk1kq2kq |c_{q} k^{q}| = |c_{q-1} k^{q-1} + \ldots + c_{p} k^{p}| \leq k^{q} + k^{q-1} + \ldots + k^{p+1} < \frac{k}{k-1} k^{q} \leq 2 k^{q}
so cq=1c_{q} = 1. Now we have
kq+cq1kq1++cpkp=0 k^{q} + c_{q-1} k^{q-1} + \ldots + c_{p} k^{p} = 0
This means (k+cq1)kq1++cpkp=0(k + c_{q-1}) k^{q-1} + \ldots + c_{p} k^{p} = 0. Hence, as above,
(k+cq1)kq1=cq2kq2++cpkp<2kq1 | (k + c_{q-1}) k^{q-1} | = | c_{q-2} k^{q-2} + \ldots + c_{p} k^{p} | < 2 k^{q-1}
Therefore, k+cq1<2|k + c_{q-1}| < 2, which means cq1=kc_{q-1} = -k or k+1-k+1.
If cq1=kc_{q-1} = -k, then cqkq+cq1kq1=0c_{q} k^{q} + c_{q-1} k^{q-1} = 0, and we get a subsequence (1,k)(1, -k).
If cq1=k+1c_{q-1} = -k+1, then cqkq+cq1kq1=kq1c_{q} k^{q} + c_{q-1} k^{q-1} = k^{q-1}. Thus
kq1+cq2kq2++cpkp=0 k^{q-1} + c_{q-2} k^{q-2} + \ldots + c_{p} k^{p} = 0
which has the exact same form as (1). We can then repeat this procedure to obtain a subsequence (1,1k,1k,,1k,k)(1, 1-k, 1-k, \ldots, 1-k, -k).
Once we have such a subsequence, the terms in the sum i=pqciki=0\sum_{i=p}^{q} c_{i} k^{i} = 0 corresponding to that subsequence sum to 0, so we may remove them and apply the same argument.

We now consider the cases.
If the base kk representation of n1n-1 contains no 0's, then ai0a_{i} \neq 0 so it is impossible to have ci=aibi=kc_{i} = a_{i} - b_{i} = -k. On the other hand, we know that cic_{i} is composed of subsequences of the form ±(1,1k,1k,,1k,k)\pm(1, 1-k, 1-k, \ldots, 1-k, -k). Therefore, if {ci}\{c_{i}\} is not the zero sequence, then the fact that ci=0\sum c_{i} = 0 implies that we must have both a subsequence (1,1k,1k,,1k,k)(1, 1-k, 1-k, \ldots, 1-k, -k) and a subsequence (1,1k,1k,,1k,k)-(1, 1-k, 1-k, \ldots, 1-k, -k), meaning that there exists ii for which ci=kc_{i} = -k, contradiction.
If the base kk representation of n1n-1 contains a 0, then picking the largest ii such that ai=0a_{i} = 0, we can change aia_{i} to kk and ai+1a_{i+1} to ai+11a_{i+1} - 1, and append a (1,k)(1, -k) to the end of the sequence. This yields another kk-representation of nn, so a kk-representation of nn is unique if and only if the base kk representation of n1n-1 contains no 0's, as desired.

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

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