Maths Olympiad Prep

Library / /12 of 16

Number theory Difficulty 7.4 National olympiad, round 2 Prove it Japan

Let a1,a2,a_1, a_2, \dots and b1,b2,b_1, b_2, \dots be two sequences consisting of positive integers such that, for any positive integer nn,
(an+1,bn+1)=(an2,bn+an2) or (an+1,bn+1)=(an+bn2,bn2) (a_{n+1}, b_{n+1}) = \left( \frac{a_n}{2}, b_n + \frac{a_n}{2} \right) \text{ or } (a_{n+1}, b_{n+1}) = \left( a_n + \frac{b_n}{2}, \frac{b_n}{2} \right)
holds. How many initial pairs (a1,b1)(a_1, b_1) with 1a1,b1401 \le a_1, b_1 \le 40 are possible?

Solution

1064\boxed{1064}
For a positive integer k, denote the maximum nonnegative integer i such that 2i divides k by v2(k). Note that v2(kl)=v2(k)+v2(l) holds for any positive integers k and l, and that v2(k2)=v2(k)1 holds for any positive even number k. \text{For a positive integer } k, \text{ denote the maximum nonnegative integer } i \text{ such that } 2^i \text{ divides } k \text{ by } v_2(k). \text{ Note that } v_2(kl) = v_2(k) + v_2(l) \text{ holds for any positive integers } k \text{ and } l, \text{ and that } v_2\left(\frac{k}{2}\right) = v_2(k) - 1 \text{ holds for any positive even number } k.
Lemma 1. Let ss and tt be positive integers.
* If v2(s)v2(t)v_2(s) \neq v_2(t), we have v2(s+t)=min{v2(s),v2(t)}v_2(s + t) = \min\{v_2(s), v_2(t)\}.

* If v2(s)=v2(t)v_2(s) = v_2(t), we have v2(s+t)>v2(s)v_2(s+t) > v_2(s).
Proof. We can write s=2v2(s)xs = 2^{v_2(s)}x, t=2v2(t)yt = 2^{v_2(t)}y for some odd integers x,yx, y.
In the case of v2(s)<v2(t)v_2(s) < v_2(t), we have s+t=2v2(s)(x+2v2(t)v2(s)y)s+t = 2^{v_2(s)}(x+2^{v_2(t)-v_2(s)}y). Since 2v2(t)v2(s)y2^{v_2(t)-v_2(s)}y is even, x+2v2(t)v2(s)yx+2^{v_2(t)-v_2(s)}y is odd. Thus v2(s+t)=v2(s)=min{v2(s),v2(t)}v_2(s+t) = v_2(s) = \min\{v_2(s), v_2(t)\} holds.
In the case of v2(s)>v2(t)v_2(s) > v_2(t) the same argument shows that v2(s+t)=min{v2(s),v2(t)}v_2(s+t) = \min\{v_2(s), v_2(t)\}.
In the case of v2(s)=v2(t)v_2(s) = v_2(t), we have s+t=2v2(s)x+2v2(s)y=2v2(s)(x+y)s+t = 2^{v_2(s)}x + 2^{v_2(s)}y = 2^{v_2(s)}(x+y). Since x+yx+y is even, we have v2(s+t)>v2(s)v_2(s+t) > v_2(s). ■

Lemma 2. If s,tNs, t \in \mathbb{N} satisfy v2(s)=v2(t)1v_2(s) = v_2(t) \ge 1, we have:
v2(t+s2)=v2(s2)=v2(s)1, \bullet \quad v_2\left(t + \frac{s}{2}\right) = v_2\left(\frac{s}{2}\right) = v_2(s) - 1,
v2(s+t2)=v2(t2)=v2(s)1. \bullet \quad v_2\left(s + \frac{t}{2}\right) = v_2\left(\frac{t}{2}\right) = v_2(s) - 1.
Proof. Since v2(s2)=v2(s)1<v2(s)=v2(t)v_2\left(\frac{s}{2}\right) = v_2(s) - 1 < v_2(s) = v_2(t), we have v2(t+s2)=min{v2(t),v2(s2)}=v2(s2)v_2\left(t + \frac{s}{2}\right) = \min\{v_2(t), v_2\left(\frac{s}{2}\right)\} = v_2\left(\frac{s}{2}\right) by Lemma 1. Thus we have v2(t+s2)=v2(s2)=v2(s)1v_2\left(t + \frac{s}{2}\right) = v_2\left(\frac{s}{2}\right) = v_2(s) - 1. Similarly v2(s+t2)=v2(t2)=v2(t)1=v2(s)1v_2\left(s + \frac{t}{2}\right) = v_2\left(\frac{t}{2}\right) = v_2(t) - 1 = v_2(s) - 1 holds. ■

We will show that, if a1,a2,a_1, a_2, \dots and b1,b2,b_1, b_2, \dots satisfy the condition of the problem, v2(a1)v2(b1)v_2(a_1) \ne v_2(b_1) holds.
Assume v2(a1)=v2(b1)v_2(a_1) = v_2(b_1). If v2(a1)=v2(b1)=0v_2(a_1) = v_2(b_1) = 0, a2a_2 cannot be an integer. If v2(a1)=v2(b1)=k1v_2(a_1) = v_2(b_1) = k \ge 1, Lemma 2 shows inductively that v2(an)=v2(bn)=kn+1v_2(a_n) = v_2(b_n) = k - n + 1 for nk+1n \le k + 1. However, when n=k+1n = k + 1 we have v2(an)=v2(bn)=0v_2(a_n) = v_2(b_n) = 0, then an+1a_{n+1} cannot be an integer. This is a contradiction and we conclude that v2(a1)v2(b1)v_2(a_1) \ne v_2(b_1).
Next we will show that, for any integers 1s,t401 \le s, t \le 40 with v2(s)v2(t)v_2(s) \ne v_2(t), there exists sequences a1,a2,a_1, a_2, \dots and b1,b2,b_1, b_2, \dots such that a1=sa_1 = s and b1=tb_1 = t.
Lemma 3. If s,tNs, t \in \mathbb{N} satisfy v2(s)v2(t)v_2(s) \ne v_2(t), at least one of the following statements hold:
* ss is even and v2(t+s2)v2(s2)v_2\left(t + \frac{s}{2}\right) \ne v_2\left(\frac{s}{2}\right) holds.
* tt is even and v2(s+t2)v2(t2)v_2\left(s + \frac{t}{2}\right) \ne v_2\left(\frac{t}{2}\right) holds.
Proof. We will show that if v2(s)>v2(t)v_2(s) > v_2(t) the first condition holds. ss is even because v2(s)1v_2(s) \ge 1.
If v2(s)=v2(t)+1v_2(s) = v_2(t) + 1, we have v2(s2)=v2(s)1=v2(t)v_2\left(\frac{s}{2}\right) = v_2(s) - 1 = v_2(t) and thus v2(t+s2)>v2(s2)v_2\left(t + \frac{s}{2}\right) > v_2\left(\frac{s}{2}\right) by Lemma 1. If v2(s)v2(t)+2v_2(s) \ge v_2(t) + 2, we have v2(s2)=v2(s)1>v2(t)v_2\left(\frac{s}{2}\right) = v_2(s) - 1 > v_2(t) and thus v2(t+s2)=min{v2(t),v2(s2)}=v2(t)<v2(s2)v_2\left(t + \frac{s}{2}\right) = \min\{v_2(t), v_2\left(\frac{s}{2}\right)\} = v_2(t) < v_2\left(\frac{s}{2}\right) by Lemma 1.

Let a1=s,b1=ta_1 = s, b_1 = t. Then for n=1,2,n = 1, 2, \dots we can proceed inductively as follows:
Since v2(an)v2(bn)v_2(a_n) \neq v_2(b_n), Lemma 3 shows that at least one of (x,y)=(an2,bn+an2)(x, y) = \left(\frac{a_n}{2}, b_n + \frac{a_n}{2}\right), (an+bn2,bn2)\left(a_n + \frac{b_n}{2}, \frac{b_n}{2}\right) is a pair such that v2(x)v2(y)v_2(x) \neq v_2(y). We set an+1=x,bn+1=ya_{n+1} = x, b_{n+1} = y for such (x,y)(x, y).
The resulting sequences a1,a2,a_1, a_2, \dots and b1,b2,b_1, b_2, \dots meet the condition of the problem. Therefore the answer is the number of pairs of integers (s,t)(s, t) with 1s,t401 \le s, t \le 40 such that v2(s)v2(t)v_2(s) \neq v_2(t).
Note that v2(n)5v_2(n) \le 5 for 1n401 \le n \le 40 because 40<2640 < 2^6. For k{0,1,,5}k \in \{0, 1, \dots, 5\}, the number f(k)f(k) of integers 1n401 \le n \le 40 such that v2(n)=kv_2(n) = k is 402k402k+1\lfloor \frac{40}{2^k} \rfloor - \lfloor \frac{40}{2^{k+1}} \rfloor. Thus we can calculate
f(0)=20,f(1)=10,f(2)=5,f(3)=3,f(4)=1,f(5)=1. f(0) = 20, \quad f(1) = 10, \quad f(2) = 5, \quad f(3) = 3, \quad f(4) = 1, \quad f(5) = 1.
The number of pairs of integers (s,t)(s, t) with 1s,t401 \le s, t \le 40 such that v2(s)=v2(t)v_2(s) = v_2(t) is k=05f(k)2=536\sum_{k=0}^{5} f(k)^2 = 536. Therefore, the answer is 402536=106440^2 - 536 = \mathbf{1064}.

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 and solution reproduced as published; topic and difficulty added by this site.