Mathlinks Contest 5 – round 1

Mathlinks Contest 5 – round 3
Solutions
By Tiberiu Popa
(perfect_radio)
Problem 1
Let x n n be a sequence of positive rational numbers, such that x1 is a positive
integer, and for all positive integers n
 2n  1
 n x n 1 , if x n 1  1
xn  
 n  1x n 1  1 , if x  1
n 1

n
Prove that there exists a constant subsequence of x n n .
Solution:
In the following I’ll prove that 1 appears infinitely many times in x n n .
Denote x1  p .
Claim 1: While x k  1 , we have x1 k 
pk
.
1 k
Proof:
We will prove by induction on k.
p 1 p  k

For k  1 , we have x 2 
.
2
1 k
Suppose it is true for some k s.t. x k  1 .
Then if x1k  1 ,
k  1 p  k  1 k  1 p  k   1  k   p  k   1 p  k  1
1 k
, and this
x 2 k 



1  k 2  k 
2  k 
2k
2k
completes the induction step.
Now observe that while x k  1 , this sequence is decreasing, so at one time x1 k will
be  1 .
Observation: Let n be a positive integer s.t. x n  1 and xn1  1 .
Now we want to find out in which case we have xn 2  1 .
Then we have xn 2 
 2nxn  2  n  2
n4
 xn 
2n
2n  1
2n  1 nxn  1 2nxn  1
xn1 

 1.
n2
n  2 n 1
n2
But x n  1 , so it sufficient 1 
n4
, i.e. n  4 .
2n
We need to find k1  Z minimal s.t.
p  k1
 1.
1  k1
 p  k1  1  k1
 p  1  2k1
p 1
 k1 
2
 p  1
Therefore k1  
.
 2 
p  k1
We have x1 k1 
 1.
1  k1
21  k1  p  k1 2 p  k1 
Then x2 k1 
.

2  k1 1  k1
2  k1
Let’s check whether x 2k1  1 .
2 p  k1 
1
2  k1
 2 p  2k1  2  k1
 2 p  2  3k1
 p  1
 2 p  2  3
 2 
If p  2v , then v  2 . If p  2v  1 , then v  0 . This means that for p  N  1,2,4
we have x 2k1  1 .

Now we must find k 2 minimal s.t. x 2 k1  k2  1 .
Claim 2: x2 k1  k2 
2 p  k1   k 2
, for any k 2  0
2  k1  k 2
Proof:
It is similar to the one for Claim 1 (now it is on induction on k 2 )
2 p  k1   k 2
1
2  k1  k 2
 2 p  k1   k 2  2  k1  k 2
 2 p  k1   2  k1  2k 2
2 p  k1   2  k1
 k2 
2
 2 p  k1   2  k1 
 k2  

2


22 p  k1   k 2 
Then x3 k1  k2 
.
3  k1  k 2

Again we check whether x3 k1  k 2  1.
22 p  k1   k 2 
1
3  k1  k 2
 22 p  k1   k 2   3  k1  k 2
 4 p  4k1  2k 2  3  k1  k 2
 4 p  3  5k1  3k 2
If p  4v , then v  0 .
1
If p  4v  1 , then v   .
3
If p  4v  2 , then v  0 .
1
If p  4v  3 , then v   .
3
Again, for p  N  1,2,4 we have x3 k1  k 2  1.

This leads us the more general formulas:
 2 m1 p  2 m1 k1  2 m2 k 2    2k m1  1  k1  k 2    k m1  m  1
km  
,
2






2 m1 p  2 m1 k1  2 m2 k 2    k m
, where x m k1  k2  km  1 ,
xm k1  k2 km 
m  k1  k 2    k m
x m  k1  k 2  k m 1 and x m  k1  k2  k m 1  1 . Of course, p  N  1,2,4.
We will prove this huge formula by induction on m.
p  k1
 p  1
For m  1 , we get k1  
, x1 k1 
, true.

1  k1
 2 
Suppose the formula is true for some m  1 .
2m  k1  k 2   k m  2 m 1 p  2 m 1 k1  2 m  2 k 2    k m 
x m  k1  k 2 k m 1 

m  k1  k 2   k m  1
m  k1  k 2    k m




2 2 m 1 p  2 m 1 k1  2 m  2 k 2    k m
2 m p  2 m k1  2 m 1 k 2    2k m


m  k1  k 2   k m  1
m  k1  k 2   k m  1
Claim 3: xm1 k1  k2 km  km 1 

2 m p  2 m k1  2 m1 k 2    k m1
m  1  k1  k 2    k m1
Proof:
We prove it by induction on k m1 .
For k m1  1 , we have:
x m 1 k1  k2 km 1




2 m p  2 m k1  2 m 1 k 2    2k m
m  1  k1  k 2   k m 
1
m  k1  k 2   k m  1

m  1  k1  k 2   k m  1

2 m p  2 m k1  2 m 1 k 2    2k m  1
m  1  k1  k 2   k m  1
, so it is true.
If it is true for some k m1 , then:


x m1 k1  k2 km  km 1 1 



p  2 m k1  2 m 1 k 2    k m1
1
m  1  k1  k 2    k m1
m  1  k1  k 2   k m  k m1  1
m  1  k1  k 2   k m  k m1  2

m
2 m p  2 m k1  2 m1 k2    k m1  1
m  1  k1  k2   k m  k m1  1
, so it is true for k m1  1 , and the induction step is complete.

Now we need to find k m1 minimal s.t. x m 1 k1  k2 km  km 1  1 .



2 m p  2 m k1  2 m1 k 2    k m1
1
m  1  k1  k 2    k m1

p  2

 2 m p  2 m k1  2 m 1 k 2    k m1  m  1  k1  k 2    k m1
2
m
m
k1  2

m 1

k 2    k m  m  1  k1  k 2    k m   2k m1

 2 p  2 k1  2 k 2    k m  m  1  k1  k 2    k m 
Now k m1  
.
2


Also we must have x m 1 k1  k2  km 1 1  1 .
m
m 1
m
For m  1,2 it was proven above.
For m  3 , we m  1  k1  k 2    k m1  1  m  k1  k 2    k m1  4 . This,
combined with the Observation, yields x m 1 k1  k2  km 1 1  1 .
So the induction step is complete and the formulas are true for any m.
 1  k1  k 2    k m1  m  1
k m  2 m2 p  2 m2 k1  2 m3 k 2    k m1  
.
2


m 1
m 1
m2
2 p  2 k1  2 k 2    2k m1  1  k1  k 2    k m1  m  1
Now if
Z ,
2
2 m1 p  2 m1 k1  2 m2 k 2    k m
then xm k1  k2 km 
 1.
m  k1  k 2    k m
We want to prove that this happens infinitely many times.
Suppose the opposite, i.e. there is a t s.t.
2 m1 p  2 m1 k1  2 m2 k 2    2k m1  1  k1  k 2    k m1  m  1
 Z , m  t .
2
1  k1  k 2    k m1  m  1

Z
2
 1  k1  k 2    k m1  m  1  1mod 2








 k1  k 2    k m1  m  1  0mod 2
Now define S m  k1  k 2    k m  m and y m  k m  1 .
 S m1  0mod 2 , m  t
We also have S m  0mod 2 . But S m  S m1  k m  1  0mod 2 , so k m  1mod 2 ,
m  t .
Let’s look again at:
 1  k1  k 2    k m  m
k m1  2 m1 p  2 m1 k1  2 m2 k 2    k m  

2


The LHS is odd, and in RHS we have even terms + one odd + the “ceiling”.
 1  k1  k 2    k m  m 
Therefore 
 is even.
2




 1  Sm 
 
 0mod 2
2 

There are two cases: S m  0mod 4 and S m  2mod 4 . The latter gives a
contradiction (odd = even), so S m  0mod 4 .
y m 1  y m  k m 1  1  k m  1  k m 1  k m
 1  k1  k 2    k m  m  
 2 m 1 p  2 m 1 k1  2 m  2 k 2    k m  

2





 1  k1  k 2    k m 1  m  1  
  2 m  2 p  2 m  2 k1  2 m 3 k 2    k m 1  
 
2



 1  k1  k 2    k m  m 
 2 m  2 p  2 m  2 k1  2 m3 k 2    k m1  k m  

2


 1  k1  k 2    k m 1  m  1
 

2






 1  k1  k 2    k m  m   1  k1  k 2    k m1  m  1
 k m  k m  
  2 

2
2

 

 1  k1  k 2    k m  m   1  k1  k 2    k m1  m  1
 
  2 

2
2

 

 1  S m   1  S m1 
 
2 
2  
2 

Choose m bigger than t.
Let a,b,  ,  s.t. S m  2 a  and y m1  2 b  (clearly a, b  1 since we are dealing
with even numbers).
We have S m 1  S m  y m 1  2 a   2 b  .
 1  S m1   1  S m   1  2 a   2 b    1  2 a  
Next y m 2  y m1  
2 
 
  2 

2  
2  
2
2 

 
 1 
 1
 2 a 1   2 b1      2  2 a 1       2 a 1   2 b1   2 a 
 2 
 2
 2 b1   2 a 1
y m 2  y m 1  2 b 1   2 a 1   2 b   2 b 1   2 a 1   2 b 1   2 a 1 

S m  2  S m1  y m  2  2 a   2 b   2 a 1   2 b 1   3 2 a 1   2 b 1 
Let’s take z s.t. 2 z | S m 1 and 2 z 1 | S m1 .





This means that 2 z | 2 2 a 1  2 b1  and 2 z 1 | 2 2 a 1  2 b1  .
These relations yield 2 z 1 | 2 a 1  2 b1  and 2 z | 2 a 1  2 b1  .




Therefore 2 z 1 | S m  2 and 2 z | S m 2 .
!!! The maximal of power of 2 which divides S m decreasing with 1 while m increases
with 1. (Note that the maximal power of 2 which divides S m is the same as the
maximal power of 2 dividing y m ).
Then for some h we have S h  2mod 4 ( z  1 ), contradiction (we know that
S m  0mod 4 for all m  t ).
Now we have proven that for every value p  N  1,2,4 which x1 can take, there
exists a constant subsequence (formed from 1’s).
Case 1: x1  1
Observe that x2  1 .
Also note that for x1  3 we also get x2  1 .
From now on the two sequences (for n  2 ) coincide and since there is a constant
subsequence in the second, there is one in the first.
Case 2: x1  2 or x1  4
In both cases we have x4  1 .
But if x1  7 we get x4  1 .
From now on the three sequences (for n  4 ) coincide and since there is a constant
subsequence in the third, there is one in the first and one in the second, and we are
done.
Problem 2
Let 0  a1  a2    a16  122 be 16 integers. Prove that there exists integers
 p, q, r, s with 1  p  r  s  q  16 , such that a p  aq  ar  a s .
Additional task: Find a larger bound than 122 (with proof).
Solution:
Let bi  ai 1  ai , for i  1,15 .
Case 1: There are 2 numbers i  j in 1,15 s.t. bi  b j .
We have ai 1  ai  a j 1  a j , i.e. ai 1  a j  a j 1  ai .
By taking  p, q, r, s   i, j  1, i  1, j  we get the integers we were looking for.
Case 2: i  j we have bi  b j .
Since ai 1  ai , it follows bi  0 , i  1,15 .
Define ci  the i-th smallest element from b1 , b2 ,, b15 , i  1,15 , i.e. c is b sorted
increasingly.
Now we also have ci  0 , i  1,15 and b1  b2    b15  c1  c2    c15 .
We have c1  1 ; c2  c1  1  2 ; c3  c2  1  3 ; …; c15  c14  1  15 .
Therefore b1  b2    b15  c1  c 2    c15  1  2  3    15 
15  16
 120 .
2
We know:
a16  a15  b15  a14  b14  b15  a13  b13  b14  b15    a1  b1  b2    b15 
 a1  120  121
But a16  121 , so a16  121 , a1  1 and b1  b2    b15  120 .
It follows that c1  c2    c15  120 , so c1  1 , c2  2 , …, c15  15 , i.e.
b1 , b2 ,, b15   1,2,,15
i) There is i  1,14 s.t. bi  bi 1  15
Take d  bi  bi 1 .
Since d  15 , d  bi and d  bi 1 , there is j  1,15 s.t. b j  d , j  i and j  i  1 .
Now we have b j  bi  bi 1 .
 a j 1  a j  ai 1  ai  ai  2  ai 1
 a j 1  ai  a j  ai  2
If i  j , take  p, q, r, s   i, j  1, i  2, j  and we get the integers we were looking
for.
If i  j , take  p, q, r, s    j, i  2, j  1, i  and we get the integers we were looking
for.
ii) i  1,14 , bi  bi 1  15
Take xi  bi  bi 1  15 , i  1,14 .
It is clear that xi  bi  bi 1  15  14  29 , i  1,14 .
Between 16 and 29 inclusively there are 14 possible values.
Suppose that i  j , xi  x j .
Since there are 14 distinct values and 14 distinct xi , it is clear that
x1 , x2 ,, x14   16,17,18,,29.
Since 29 can be achieved only by 14+15 and 28 only by 13+15, it follows that bi  15
for some i and bi 1 , bi 1   13,14.
But we have b j  1 for some j and at least one of the numbers b j 1 and b j 1 is
defined, and is smaller than or equal to 14. Now we get either x j 1  15 or x j 1  15 .
Contradiction.
Therefore there are i  j in 1,14 s.t. xi  x j .
 bi  bi 1  b j  b j 1
 ai 1  ai  ai  2  ai 1  a j 1  a j  a j  2  a j 1
 ai  ai  2  a j  a j  2
 a j  ai  2  ai  a j  2
If i  j  2 , then take  p, q, r, s   i, j  2, i  2, j  and we get the integers we were
looking for.
If i  j  1 , then we have ai 1  ai  2  ai  ai 3 , so take  p, q, r, s   i, i  3, i  1, i  2
and we get the integers we were looking for.
In conclusion, for any integers 0  a1  a2    a16  122 , there exists integers
 p, q, r, s with 1  p  r  s  q  16 , such that a p  aq  ar  a s .
Additional task:
Let’s take the new bound 123 (since you asked only for a larger bound, this should be
enough). So the problem sounds now like this:
Let 0  a1  a2    a16  123 be 16 integers. Prove that there exists integers
 p, q, r, s with 1  p  r  s  q  16 , such that a p  aq  ar  a s .
First observe that in the original problem just length of the interval counted, so it is
true for any k  a1  a2    a16  122  k , k  Z .
Use this result in the new problem to get that it is true if the numbers fulfill
k  a1  a2    a16  122  k , for k  0 or for k  1 .
The case that remains is a1  1 and a16  122 .
Let bi  ai 1  ai , for i  1,15 .
Case 1: There are 2 numbers i  j in 1,15 s.t. bi  b j .
Take  p, q, r, s   i, j  1, i  1, j  and we get what we were searching for.
Case 2: i  j we have bi  b j
We know that b1  b2    b16  120 .
But b1  b2    b16  a16  a1  121 .
The only case possible is b1 , b2 ,, b16   1,2,,13,14,16 .
i) There is i  1,14 s.t. bi  bi 1  14 or bi  bi 1  16 .
Denote d  bi  bi 1 .
But d  b j for some j and we get the numbers as above.
ii) i  1,14 , bi  bi 1  15,17,18,,29,30
Take xi  bi  bi 1 , i  1,14 .
There 15 possible values ( 15,17,18,,29,30) of xi , and 14 numbers xi . (*)
Suppose that i  j , xi  x j .
30 can be achieved only by 16+14
29 can be achieved only by 16+13
28 can be achieved only by 16+12
Therefore at most 2 numbers from 28,29,30 are equal to some xi .
From (*) it is clear that at least 2 numbers from 28,29,30 are equal to some xi .
We have xi  16 for some i and xi 1 , xi 1   12,13,14 . (~)
27 can be achieved by 13+14 or by 16+11.
16+11 is clearly impossible, 13 must be next to 14 in b.
26 can be achieved by 14+12 or by 16+10.
16+10 is clearly impossible, 12 must be next to 14 in b.
So 14 is between 12 and 13 in b and we get a contradiction with (~).
Therefore there are i  j in 1,14 s.t. xi  x j .
 bi  bi 1  b j  b j 1
 ai 1  ai  ai  2  ai 1  a j 1  a j  a j  2  a j 1
 ai  ai  2  a j  a j  2
 a j  ai  2  ai  a j  2
If i  j  2 , then take  p, q, r, s   i, j  2, i  2, j  and we get the integers we were
looking for.
If i  j  1 , then we have ai 1  ai  2  ai  ai 3 , so take  p, q, r, s   i, i  3, i  1, i  2
and we get the integers we were looking for.
In conclusion, for any integers 0  a1  a2    a16  123 , there exists integers
 p, q, r, s with 1  p  r  s  q  16 , such that a p  aq  ar  a s .