Maths Olympiad Prep

Track / Stage 8 / 8 of 180 #2188 of 2444

Problem 2188

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.0 Prove it EGMO · European Girls' Mathematical Olympiad (EGMO) · 2024

Two different integers uu and vv are written on a board. We perform a sequence of steps. At each step we do one of the following two operations:

(i) If aa and bb are different integers on the board, then we can write a+ba+b on the board, if it is not already there.

(ii) If a,ba, b and cc are three different integers on the board, and if an integer xx satisfies ax2+bx+c=0a x^{2}+b x+c=0, then we can write xx on the board, if it is not already there.

Determine all pairs of starting numbers (u,v)(u, v) from which any integer can eventually be written on the board after a finite sequence of steps.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solutions — 3

Solution 1

Solution:

We will show that the answer are the integer pairs (u,v)(u, v) such that u0u \neq 0, v0v \neq 0, {u,v}{1,1}\{u, v\} \neq \{-1,1\} and u>0u>0 or v>0v>0.

If u=0u=0 or v=0v=0, then (i) will never yield a new number and we cannot use (ii) with only two numbers. Hence, if u=0u=0 or v=0v=0, we cannot reach every possible yy. From now on, assume u0u \neq 0 and v0v \neq 0.

If both numbers u,vu, v were negative, we will show that there can only be negative numbers on the board. With negative numbers a,ba, b, operation (i) will only yield a negative number. The same holds for operation (ii), because for a non-negative xx and negative a,b,ca, b, c, we have ax2+bx+c<0a x^{2}+b x+c<0. Hence, if both u<0u<0 and v<0v<0, then we cannot reach every possible yy. From now on, assume that at least one of u,vu, v is positive. Without loss of generality take u<vu<v, and so v>0v>0.

After one step, we can have the numbers u,v,u+vu, v, u+v, which are mutually distinct due to u,vu, v being nonzero. Notice that the equation ux2+(u+v)x+v=0u x^{2}+(u+v) x+v=0 has a root 1-1, and so we can have 1-1 on the board.

We now check two cases: case v=1v=1, and case v>1v>1.

If v=1v=1, then u<0u<0. Further split the case of v=1v=1 based on whether u=1u=-1 or u<1u<-1.

If v=1v=1 and u=1u=-1, we can only additionally write number 00 on the board using operation (i); and no additional numbers using (ii) because setting {a,b,c}\{a, b, c\} to {1,0,1}\{-1,0,1\} in any order only has solutions for xx in {1,0,1}\{-1,0,1\}. Hence, if {u,v}={1,1}\{u, v\}=\{-1,1\}, then we cannot reach every possible yy.

If v=1v=1 and u<1u<-1, we can use operation (i) on numbers u,1u,-1 (and then repeat choosing the obtained result and 1-1) to get any negative number smaller than uu, and operation (i) on numbers (u,1)(u, 1) (and then repeat choosing the obtained result and 11) to get any negative number larger than uu, as well as 00. Then, we set (a,b,c)=(0,1,2)(a, b, c)=(0,1,-2) and apply operation (ii) to additionally get number 22. Applying (i) on (2,1)(2,1) (and then repeat choosing the obtained result and 11), we can get all the remaining integers too.

From now on, assume v>1v>1. Recall that we can make u+vu+v and 1-1.

We will now apply operation (i). First, (v,1)(v,-1) gives v1v-1. Next, (v,v1)(v, v-1) gives 2v12 v-1. Since v>1v>1, we know v2v1v \neq 2 v-1, so we can apply operation (i) on (v,2v1)(v, 2 v-1) to get 3v13 v-1, and then continue adding (v,kv1)(v, k v-1) to get (k+1)v1(k+1) v-1 for any positive kk. Since v>1v>1, we can get an arbitrarily large integer by repeating this.

If aa is any positive number on the board, applying (i) to (a,1)(a,-1) gives a1a-1. By repeating this, we have that we can get all numbers smaller than aa and larger than or equal to 1-1. Together with previously having found a way to get an arbitrarily large integer, we have that we can get any integer l1l \geq -1 on the board.

Now, we set (a,b,c)=(0,1,2)(a, b, c)=(0,1,2) and apply operation (ii) to additionally get number 2-2. Then we can repeat operation (i) on (1,2)(-1,-2) (and afterwards on 1-1 and the obtained result) to get any negative number.

Therefore, if u0,v0,{u,v}{1,1}u \neq 0, v \neq 0, \{u, v\} \neq \{-1,1\} and u>0u>0 or v>0v>0, we can write every integer on the board.

Solution 2

Solution:

If u=0u=0 or v=0v=0 then we can only get {u,v}\{u, v\}.

Proof. If u=0u=0 or v=0v=0, then (i) will never yield a new number and we cannot use (ii) with only two numbers.

If max(u,v)<0\max (u, v)<0, we cannot get non-negative numbers.

Proof. For a,b,c<0a, b, c<0 :
(i) cannot generate a non-negative number as a+b<0a+b<0.
(ii) cannot generate a non-negative number as for x0x \geq 0 : ax2+bx+cc<0a x^{2}+b x+c \leq c<0.

If u+v0,u,v0u+v \neq 0, u, v \neq 0 and max(u,v)>0\max (u, v)>0, we can get every number.

Proof. uvu+vu \neq v \rightarrow u+v can be written. u0u \neq 0, so u+vvu+2vu+v \neq v \rightarrow u+2 v can be written. v0v \neq 0, so u+2vuu+2 v \neq u, meaning that 2u+2v2 u+2 v can be written. If for n>1,n(u+v)n>1, n(u+v) can be written then (n+1)(u+v)=n(u+v)+(u+v)(n+1)(u+v)=n(u+v)+(u+v) can also be written, because u+v0u+v \neq 0, so n(u+v)(u+v)n(u+v) \neq(u+v). Therefore, by induction for all n>0n>0 the number n(u+v)n(u+v) can be written.

Taking n=2,3,n=2,3, \ldots and (u+v)(x+1)(x+n)=(u+v)x2+(u+v)(n+1)x+(u+v)n=0(u+v)(x+1)(x+n)=(u+v) x^{2}+(u+v)(n+1) x+(u+v) n=0 gives x=1x=-1 and x=nx=-n \rightarrow for all n>0n>0 we can get n-n (we can get all the negative numbers). Additionally, we can get u+(u)=0u+(-u)=0.

For n1n \geq 1 we can take 0x2+ux+(un)=00 \cdot x^{2}+u x+(-u n)=0 as u0u,nu,0u \neq 0 \rightarrow u,-n u, 0 are all distinct, therefore we can get nn. Thus, we can get all the numbers.

If u+v=0u+v=0 and max(u,v)>1\max (u, v)>1 we can get all the numbers.

Proof. We can get 0=u+v0=u+v as uvu \neq v. Take 0x2+uxu=00 \cdot x^{2}+u x-u=0 so we can get 11 written on the board. Take (u,v)=(1,max(u,v))(u', v')=(1, \max (u, v)) and then use the result from claim 3. As 0<u=1<max(u,v)=v0<u'=1<\max (u, v)=v' and u+v>0u'+v'>0 we can get all the numbers.

Remaining case: If v=1v=1 and u=1u=-1, we can only additionally write number 00 on the board using operation (i); and no additional numbers using (ii) because setting {a,b,c}\{a, b, c\} to {1,0,1}\{-1,0,1\} in any order only has solutions for xx in {1,0,1}\{-1,0,1\}. Hence, if {u,v}={1,1}\{u, v\}=\{-1,1\}, then we cannot reach every possible yy.

Solution 3

Solution:

We show none of the initial number can be 00, as in Solution 1. Then, we split into three cases: initial numbers having different signs, both being positive, and both being negative.

Case 1. Suppose we have two numbers u,vu, v with different signs such that gcd(u,v)=k\operatorname{gcd}(u, v)=k for some kZ+k \in \mathbb{Z}^{+}. Without loss of generality assume that u>0u>0 and v<0v<0.

Case 1.1. v<kv<-k :
We can generate all numbers yy such that kyk \mid y and yuy \leq u.

Proof. Define u=uk,v=vku'=\frac{u}{k}, v'=\frac{v}{k}. Note that by definition, gcd(u,v)=1\operatorname{gcd}(u', v')=1. If starting with numbers u,vu', v', we can make a sequence of applications of only the (i) rule to write a number y=pu+qvy=p \cdot u'+q \cdot v' on the board, then we can apply the same sequence of moves to u,vu, v to write ky=pu+qvk \cdot y=p \cdot u+q \cdot v on the board.

Therefore, we will prove instead that if v<1v'<-1, we can write all numbers y<uy<u' on the board, which is equivalent to the lemma.

We attempt to write numbers u+qvu'+q \cdot v' for qZ+q \in \mathbb{Z}^{+} on the board by repeatedly adding vv' to uu'. This process can only ever halt if we reach a point where u+qv=vu'+q \cdot v'=v'. That cannot occur, as it would imply u=(1q)vu'=(1-q) \cdot v'. Taking into account that u,v0u', v' \neq 0, that implies gcd(u,v)=v\operatorname{gcd}(u', v')=|v'|. That is a contradiction, as v>1|v'|>1.

Therefore, we can write all numbers of the form u+qvu'+q \cdot v' on the board for qZ+q \in \mathbb{Z}^{+}. We will use these numbers to construct an arbitrary integer yy.

If we want to write a number y<uy<u' on the board, and we already have a number n<yn<y on the board such that yn(modu)y \equiv n \pmod{u'}, then we can construct yy by repeatedly adding uu' to nn until we reach yy, skipping all numbers that are already on the board. As y<uy<u', none of the numbers we attempt to add uu' to will be equal to uu'.

Suppose we fix any number y<uy<u'. As gcd(u,v)=1\operatorname{gcd}(u', v')=1, qvq \cdot v' takes all residues modulo uu' as qq runs through the positive integers. Therefore, we will always be able to find a number nn of the form u+qvu'+q \cdot v' such that yn(modu)y \equiv n \pmod{u'}. We can generate an arbitrarily small nn' by taking n=n+luv=u+(q+lu)vn'=n+l \cdot u' \cdot v'=u'+(q+l \cdot u') \cdot v' for large enough ll, making both n<yn'<y and ny(modu)n' \equiv y \pmod{u'} true.

Therefore, we can write all numbers y<uy<u' on the board. Thus, starting from uu and vv, we can get all numbers yuy \leq u such that kyk \mid y.

The numbers k,0k, 0 and all negative multiples of kk are a subset of the integers yuy \leq u such that kyk \mid y. Therefore, we have all of those numbers on the board.

We can now get an arbitrary nonzero number by applying (ii) to the polynomial k(xn)(x+n)=kx2+0xn2kk \cdot (x-n)(x+n)=k \cdot x^{2}+0 \cdot x-n^{2} \cdot k. The coefficients of this polynomial are distinct for all integers n0n \neq 0, and they are from the set {k,0}{qkq<0}\{k, 0\} \cup \{q \cdot k \mid q<0\}, which we have on the board. Therefore the rule application is valid.

As this works for all integers nZ{0}n \in \mathbb{Z} \setminus \{0\}, and 00 is already on the board, we have proven that we can write all integers on the board.

Case 1.2. v=kv=-k :

Case 1.2.1. k1k \neq 1.
If k1k \neq 1, we can generate 1-1 from the polynomial ux2+(u+v)x+vu \cdot x^{2}+(u+v) x+v. We can now repeatedly add 1-1 to v=kv=-k until we reach 2k-2k on the board. Now, we can appeal to Case 1.1.

Case 1.2.2. k=1k=1.
To restate the conditions of this sub-case, v=k=1v=-k=-1, and uu is an arbitrary positive number.

Case 1.2.2.1. u=1u=1.
If u=1u=1, we are only ever able to construct the numbers 1,0,1-1,0,1, no matter how we apply the rules.

Case 1.2.2.2. u1u \neq 1.
We can subtract 11 from uu until we reach 00. This procedure also generates 11. We now add 11 to uu until we get all positive numbers.

Now, we find an arbitrary polynomial with different positive coefficients that have a negative root smaller than 1-1. An example is (x+3)2(x+3)^{2}.

We will now keep adding 1-1 to 3-3 to get all the negative numbers y3y \leq -3. To get 2-2, we can add 3-3 to 11, generating all integers.

Case 2. Suppose that both of u,vu, v are positive.

We can now use any method from the previous solutions to generate a negative number, and then appeal to Case 1.

Case 3. Suppose u<0,v<0u<0, v<0.

Then there can only be negative numbers on the board. With negative numbers a,ba, b, operation (i) will only yield a negative number. The same holds for operation (ii), because for a non-negative xx and negative a,b,ca, b, c, we have ax2+bx+c<0a x^{2}+b x+c<0. Hence, if both u<0u<0 and v<0v<0, then we cannot reach every possible yy.

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