Maths Olympiad Prep

Library / /721 of 740

, 2013

Algebra Difficulty 5.9 AIME, harder Prove it United States

Problem:
Find the sum of all positive integers nn such that there exists an integer bb with b4|b| \neq 4 such that the base 4-4 representation of nn is the same as the base bb representation of nn.

Solution

Solution:
All 1-digit numbers, 1,2,31,2,3, are solutions when, say, b=5b=5. (Of course, d{0,1,2,3}d \in \{0,1,2,3\} works for any base bb of absolute value greater than dd but not equal to 44.)

Consider now positive integers n=(ada1a0)4n=(a_{d} \ldots a_{1} a_{0})_{4} with more than one digit, so d1d \geq 1, ad0a_{d} \neq 0, and 0ak30 \leq a_{k} \leq 3 for k=0,1,,dk=0,1, \ldots, d. Then nn has the same representation in base bb if and only if b>maxak|b|>\max a_{k} and k=0dak(4)k=k=0dakbk\sum_{k=0}^{d} a_{k}(-4)^{k}=\sum_{k=0}^{d} a_{k} b^{k}, or equivalently, k=0dak(bk(4)k)=0\sum_{k=0}^{d} a_{k}\left(b^{k}-(-4)^{k}\right)=0.

First we prove that b3b \leq 3. Indeed, if b4b \geq 4, then b4b5b \neq 4 \Longrightarrow b \geq 5, so bk(4)kb^{k}-(-4)^{k} is positive for all k1k \geq 1 (and zero for k=0k=0). But then k=0dak(bk(4)k)ad(bd(4)d)\sum_{k=0}^{d} a_{k}\left(b^{k}-(-4)^{k}\right) \geq a_{d}\left(b^{d}-(-4)^{d}\right) must be positive, and cannot vanish.

Next, we show b2b \geq 2. Assume otherwise for the sake of contradiction; bb cannot be 0,±10, \pm 1 (these bases don't make sense in general) or 4-4, so we may label two distinct negative integers r,s-r,-s with r1s2r-1 \geq s \geq 2 such that {r,s}={4,b}\{r, s\}=\{4,-b\}, s>maxaks>\max a_{k}, and k=0dak((r)k(s)k)=0\sum_{k=0}^{d} a_{k}\left((-r)^{k}-(-s)^{k}\right)=0, which, combined with the fact that rksk0r^{k}-s^{k} \geq 0 (equality only at k=0k=0), yields

rdsdad(rdsd)=k=0d1(1)d1kak(rksk)k=0d1(s1)(rksk)=(s1)rd1r1(sd1) \begin{aligned} r^{d}-s^{d} \leq a_{d}\left(r^{d}-s^{d}\right) & =\sum_{k=0}^{d-1}(-1)^{d-1-k} a_{k}\left(r^{k}-s^{k}\right) \\ & \leq \sum_{k=0}^{d-1}(s-1)\left(r^{k}-s^{k}\right)=(s-1) \frac{r^{d}-1}{r-1}-\left(s^{d}-1\right) \end{aligned}

Hence rd1(s1)rd1r1<(r1)rd1r1=rd1r^{d}-1 \leq(s-1) \frac{r^{d}-1}{r-1}<(r-1) \frac{r^{d}-1}{r-1}=r^{d}-1, which is absurd.

Thus b2b \geq 2, and since b3b \leq 3 we must either have b=2b=2 or b=3b=3. In particular, all aka_{k} must be at most b1b-1. We now rewrite our condition as

ad(4d(b)d)=k=0d1(1)d1kak(4k(b)k) a_{d}\left(4^{d}-(-b)^{d}\right)=\sum_{k=0}^{d-1}(-1)^{d-1-k} a_{k}\left(4^{k}-(-b)^{k}\right)

Since 4k(b)k04^{k}-(-b)^{k} \geq 0 for k0k \geq 0, with equality only at k=0k=0, we deduce

ad(4d(b)d)kd1(b1)(4k(b)k) a_{d}\left(4^{d}-(-b)^{d}\right) \leq \sum_{k \equiv d-1}(b-1)\left(4^{k}-(-b)^{k}\right)

If d1d-1 is even (dd is odd), this gives

ad(4d+bd)(b1)4d+140421(b1)bd+1b0b21 a_{d}\left(4^{d}+b^{d}\right) \leq(b-1) \frac{4^{d+1}-4^{0}}{4^{2}-1}-(b-1) \frac{b^{d+1}-b^{0}}{b^{2}-1}

so 4d<(b1)4d+115b>1+1544^{d}<(b-1) \frac{4^{d+1}}{15} \Longrightarrow b>1+\frac{15}{4}, which is impossible.

Thus d1d-1 is odd (dd is even), and we get

ad(4dbd)(b1)4d+141421+(b1)bd+1b1b21bd14d1ad415(b1)ad+bb+1 a_{d}\left(4^{d}-b^{d}\right) \leq(b-1) \frac{4^{d+1}-4^{1}}{4^{2}-1}+(b-1) \frac{b^{d+1}-b^{1}}{b^{2}-1} \Longleftrightarrow \frac{b^{d}-1}{4^{d}-1} \geq \frac{a_{d}-\frac{4}{15}(b-1)}{a_{d}+\frac{b}{b+1}}

If b=2b=2, then ad=1a_{d}=1, so 12d+1=2d14d11125\frac{1}{2^{d}+1}=\frac{2^{d}-1}{4^{d}-1} \geq \frac{11}{25}, which is clearly impossible (d2)(d \geq 2).

If b=3b=3 and ad=2a_{d}=2, then 9d/2116d/21815\frac{9^{d / 2}-1}{16^{d / 2}-1} \leq \frac{8}{15}. Since dd is even, it's easy to check this holds only for d/2=1d / 2=1, with equality, so ak=b1a_{k}=b-1 if kd1(mod2)k \equiv d-1\pmod{2}. Thus (ad,,a0)=(2,2,a0)(a_{d}, \ldots, a_{0})=(2,2, a_{0}), yielding solutions (22x)3(22x)_{3} (which do work; note that the last digit doesn't matter).

Otherwise, if b=3b=3 and ad=1a_{d}=1, then 9d/2116d/21415\frac{9^{d / 2}-1}{16^{d / 2}-1} \leq \frac{4}{15}. It's easy to check d/2{1,2}d / 2 \in\{1,2\}.
If d/2=1d / 2=1, we're solving 16a24a1+a0=9a2+3a1+a0a2=a116 a_{2}-4 a_{1}+a_{0}=9 a_{2}+3 a_{1}+a_{0} \Longleftrightarrow a_{2}=a_{1}. We thus obtain the working solution (11x)3(11x)_{3}. (Note that 110=12220110=\frac{1}{2} 220 in bases 4,3-4,3.)
If d/2=2d / 2=2, we want 256a464a3+16a24a1+a0=81a4+27a3+9a2+3a1+a0256 a_{4}-64 a_{3}+16 a_{2}-4 a_{1}+a_{0}=81 a_{4}+27 a_{3}+9 a_{2}+3 a_{1}+a_{0}, or 175=91a37a2+7a1175=91 a_{3}-7 a_{2}+7 a_{1}, which simplifies to 25=13a3a2+a125=13 a_{3}-a_{2}+a_{1}. This gives the working solutions (1210x)3,(1221x)3(1210x)_{3}, (1221x)_{3}. (Note that 12100=110212100=110^{2} and 12210=1102+11012210=110^{2}+110 in bases 4,3-4,3.)

The list of all nontrivial (2\geq 2-digit) solutions (in base 4-4 and bb) is then 11x,22x,1210x,1221x11x, 22x, 1210x, 1221x, where b=3b=3 and x{0,1,2}x \in\{0,1,2\}. In base 1010, they are 12+x,212+x,122+x,122+12+x12+x, 2 \cdot 12+x, 12^{2}+x, 12^{2}+12+x, with sum 3(2122+412)+4(0+1+2)=10203\left(2 \cdot 12^{2}+4 \cdot 12\right)+4(0+1+2)=1020.

Finally, we need to include the trivial solutions n=1,2,3n=1,2,3, for a total sum of 10261026.

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.