Volume 21, Number 5 April 2018 – June 2018
Olympiad Corner
Below were the problems of the 2017 Serbian IMO Team Selection Competition for high school students. The event was held in Belgrade on May 21 and 22, 2017.
Time allowed was 270 minutes per day.
First Day
Problem 1. (Dušan Djukić) Let D be
the midpoint of side BC of a triangle ABC. Points E and F are taken on the respective sides AC and AB such that DE=DF and ∠EDF=∠BAC. Prove that
. 4
AC AB DE
Problem 2. (Bojan Bašić) Given an
ordered pair of positive integers (x,y) with exactly one even coordinate, a step maps this pair to (x/2, y+x/2) if 2|x, and to (x+y/2,y/2) if 2|y. Prove that for every odd positive integer n>1 there exists an even positive integer b, b<n, such that after finitely many steps the pair (n,b) maps to the pair (b,n). (continued on page 4)
Strategies and Plans
Kin Y. Li
In this article, we will be looking at some Math Olympiad problems from different countries and regions. Some require strategies or plans to perform certain tasks. We hope these arouse your interest. Here are the examples. Example 1 (1973 IMO). A soldier has to investigate whether there are mines in an area that has the form of an equilateral triangle. The radius of his detector is equal to one-half of an altitude of the triangle. The soldier starts from one vertex of the triangle. Determine the shortest path that the soldier has to traverse in order to check the whole region.
Solution. Suppose that the soldier starts at the vertex A of the equilateral triangle ABC of side length a. Let φ and ψ be the arcs of circles with centers B and C and radii a 3 /4 respectively, that lie inside the triangle. In order to check the vertices B and C he must visit some point D in φ and E in ψ.
Thus his path cannot be shorter than the path ADE (or AED) itself. The length of the path ADE is AD+DE≥AD+DC- a 3 /4. Let F be the reflection of C across the line MN, where M and N are the midpoints of AB and BC respectively. Then DC≥DF and hence AD+DC≥AD+DF≥AF. So 4 3 2 7 4 3 a a AF DE AD
with equality if and only if D is the midpoint of arc φ and E is the intersection point of CD and arc ψ. In following the path ADE, the soldier will check the whole region. Therefore, this
path (as well as the one symmetric to it) is the shortest path the soldier can check the whole field.
Example 2 (2011 Saudi Arabia Math Competition). A Geostationary Earth Orbit is situated directly above the equator and has a period equal to the Earth’s rotational period. It is at the precise distance of 22,236 miles above the Earth that a satellite can maintain an orbit with a period of rotation around the Earth exactly equal to 24 hours. Because the satellites revolve at the same rotational speed of the Earth, they appear stationary from the Earth surface. That is why most stationary antennas (satellite dishes) do not need to move once they have been properly aimed at a target satellite in the sky. In an international project, a total of ten stations were equally spaced on this orbit (at the precise distance of 22,236 miles above the equator). Given that the radius of the Earth is 3960 miles, find the exact straight distance between two neighboring stations. Write your answer in the form a + b c , where a, b, c are integers and c>0 is square-free.
Solution. Let A and B be neighboring stations and O be the center of the Earth. Now ∠AOB=36°. Let θ=18°. Then AB=2R sin θ, where R = 22236 + 3960 =26196. Since we have sin 36°=cos 54°, so sin 2θ=cos 3θ. That is, 2cos θ sin θ = 4 cos3θ−3cos θ. Dividing by cos θ and
expressing in terms of sin θ, we get 4sin2θ+2sinθ−1=0. Using the quadratic
formula, we have sin θ=( 5-1)/4. Then AB=2Rsin θ =13098( 5-1). So a = -13098, b = 13098 and c = 5.
Example 3 (2008 German National Math Competition). On a bookshelf, there are n books (n≥3) from different authors standing side by side. A librarian inspects the two leftmost books and changes their places if and (continued on page 2) Editors: 高 子 眉 (KO Tsz-Mei)
梁 達 榮 (LEUNG Tat-Wing)
李 健 賢 (LI Kin-Yin), Dept. of Math., HKUST
吳 鏡 波 (NG Keng-Po Roger), ITC, HKPU
Artist: 楊 秀 英 (YEUNG Sau-Ying Camille), MFA, CU
Acknowledgment: Thanks to Sindy Ting, Math. Dept.,
HKUST for general assistance.
On-line: http://www.math.ust.hk/excalibur/
The editors welcome contributions from all teachers and students. With your submission, please include your name, address, school, email, telephone and fax numbers (if available). Electronic submissions, especially in MS Word, are encouraged. The deadline for receiving material for the next issue is August 31, 2018.
For individual subscription for the next five issues for the 17-18 academic year, send us five stamped self-addressed envelopes. Send all correspondence to:
Dr. Kin-Yin LI, Math Dept., Hong Kong Univ. of Science and Technology, Clear Water Bay, Kowloon, Hong Kong
Fax: (852) 2358 1643 Email: [email protected]
© Department of Mathematics, The Hong Kong University of Science and Technology
Mathematical Excalibur, Vol. 21, No. 5, Apr. 18 – Jun. 18 Page 2
only if they are not in alphabetical order. Afterward, he does the same to the second and the third book from the left and so on. Acting this way, he passes the whole row of books three times in total. Determine the number of different starting arrangements for which the books will finally be ordered alphabetically.
Solution. There are exactly 6·4n-3
arrangements for which the books are in order after 3 runs. For a proof, we number the positions and the books in alphabetical order from 1 to n. Obviously, for the position of p(k) of book number k at the beginning it is necessary that p(k)-k≤3. Now this condition is also sufficient: At every ordering run, all of the books standing right to their correct place are shifted one place to the left. On the other hand, no book can be shifted to the right beyond its correct place because if there is a book at position p(k) with p(k)>k, there must be at least one book on the left side of p(k) with its number larger than p(k). Such a book takes over any book with a number smaller than p(k).
The number given in the answer is then calculated by regarding that each of the books with numbers 1,2,…, n−4 that is not occupied by a book with a smaller number. For the last three books there are only 3, 2 and 1 places left. Hence the result follows.
Example 4 (2000 Russian Math Olympiad). Two pirates divide their loot, consisting of two sacks of coins and one diamond. They decide to use the following rules. On each turn, one pirate chooses a sack and takes 2m coin from it, keeping m for himself and putting the rest into the other sack. The pirates alternatively taking turns until no more moves are possible; the first pirate unable to make a move loses the diamond, and the other pirate takes it. For which initial numbers of coins can the first pirate guarantee that he will obtain the diamond?
Solution. We claim that if there are x and y coins left in the two sacks, respectively, then the next player P1 to
move has a winning strategy if and only if |x-y|>1. Otherwise, the other player P2 has a winning strategy.
We prove the claim by induction on the total numbers of coins, x+y. I
f
x+y=0,
then no moves are possible and the next player does not have a winning strategy. Now assuming that the claim is true when x+y≤n for some nonnegative n, we prove that it is true when x+y=n+1.
First consider the case |x-y|≤1. Assume that a move is possible. Otherwise, the next player P1 automatically loses, in
accordance with our claim. The next player must take 2m coins from one sack, say the one containing x coins, and put m coins into the sack containing y coins. Hence the new difference between the number of coins in the sacks is
|(x-2m)-(y+m)|≥|-3m| −|y-x|≥3-1=2. At this point, there are now a total of x+y-m coins in the sacks, and the difference between the numbers of coins in the two sacks is at least 2. Thus, by induction hypothesis, P2 has a winning
strategy. This proves the claim when |x-y|≤1.
Now consider the case |x-y|≥2. Without loss of generality, let x>y. P1 would like to
find a m such that 2m≤x, m≥1 and |(x-2m)-(y+m)|≤1.
The number m=[(x-y-1)/3] satisfies the last two inequalities above and we claim 2m≤x as well. Indeed, x-2m is nonnegative because it differs by at most 1 from the positive number y+m. After taking 2m coins from the sack with x coins, P1 leaves a total of x+y-m coins, where
the difference between the numbers of coins in the sacks is at most 1. Hence, by the induction hypothesis, the other player P2 has no winning strategy. It follows that
P1 has a winning strategy, as desired.
This completes the proof of the induction and of the claim. It follows that the first pirate can guarantee that he will obtain the diamond if and only if the number of coins initially in the sacks differs by at least 2. Example 5 (2015 Croatian National Math Competition). In a country between every two cities there is a direct bus or a direct train line (all lines are two-way and they don’t pass through any other city). Prove that all cities in that country can be arranged in two disjoint sets so that all cities in one set can be visited using only train so that no city is visited twice, and all cities in the other set can be visited using only bus so that no city is visited twice. Solution. Let G be the set of all cities in the country. For disjoint subsets A, Z of G,
we call a pair (A,Z) good if all cities in the set A can be visited using only bus such that no city is visited twice and all cities in the set Z can be visited using only train such that no city is visited twice.
Let (A,Z) be a good pair such that A∪Z has the maximum number of elements. If we prove A∪Z=G, then the statement of the problem will follow.
Let us assume the opposite, i.e. there is a city g which is not from A nor Z. Without loss of generality we can assume that A and Z are non-empty because otherwise we can transfer any city from a non-empty set to an empty one.
Let n be the number of cities in the set A and m be the number of cities in the set Z. Let us arrange the cities from A in the series a1,…,an such that every
two consecutive cities in that series are connected by a direct bus line. Also, let us arrange the cities from Z in the series z1,…,zm such that every two
consecutive cities in that series are connected by a direct train line. Since we assumed that the pair (A,Z) is maximum, the cities g and a1 have to
be connected by train (otherwise the pair (A∪{g},Z) would be a good pair whose union would have more elements than A∪Z, and g and z1 have
to be connected by bus (otherwise the pair (A,Z ∪{g}) would be a good pair whose union would have more element than A∪Z).
The cities a1 and z1 have to be
connected by bus or by train. If a1 and
z1 are connected by bus, let us put
A’={z1,g,a1,…,an} and Z’={z2,…,zm}.
Then (A’,Z’) is a good pair and the number of elements of A’∪Z’ is greater than the number of elements of A∪Z, which contradicts the assumption. If a1 and z1 are connected by train, let
us put A”={a2,…,an} and Z”={a1,g,
z1,…,zm}. Then (A”,Z”) is a good pair
and the number of elements of A”∪Z” is greater than the number of elements of A∪Z, which contradicts the assumption.
Since all cases lead to contradiction, we conclude that the assumption was wrong and that every city is either in the set A or in the set Z.
Problem Corner
We welcome readers to submit their solutions to the problems posed below for publication consideration. The solutions should be preceded by the solver’s name, home (or email) address and school affiliation. Please send submissions to Dr. Kin Y. Li, Department of Mathematics, The Hong Kong University of Science & Technology, Clear Water Bay, Kowloon, Hong Kong. The deadline for sending solutions is August 31, 2018.
Problem 516. Determine all triples (p,m,n) of positive integers such that p is prime and 2mp2+1=n5 holds.
Problem 517. For all positive x and y, prove that
x2y2(x2+y2-2) ≥ (xy-1)(x+y). Problem 518. Let I be the incenter and AD be a diameter of the circumcircle of ∆ABC. Let point E be on the ray BA and point F be on the ray CA. If the lengths of BE and CF are both equal to the semiperimeter of ∆ABC, then prove that lines EF and DI are perpendicular.
Problem 519. Let A and B be subsets of the positive integers with 10 and 9 elements respectively. Suppose for every x,y,u,v∈A satisfying x+y=u+v, we have {x,y}={u,v}. Prove that the set A+B={a+b: a∈A, b∈B} has at least 50 elements.
Problem 520. Let P be the set of all polynomials f(x)=ax2+bx,where a,b are
nonnegative integers less than 201018.
Find the number of polynomials f in P for which there is a polynomial g in P such that g(f(k))≡k (mod 201018) for all
integers k. *****************
Solutions
**************** Problem 511. Let x1,x2,…,x40 bepositive integers with sum equal to 58. Find the maximum and minimum possible value of x12+x22+⋯+x402.
Solution. Arpon BASU (AECS-4, Mumbai, India), CHUI Tsz Fung (Ma Tau Chung Government Primary School, P4), William KAHN (Sidney, Australia), LAI Wai Lok (La Salle Primary School), LEUNG Hei Chun,
LUI On Ki, George SHEN,
Toshihiro SHIMIZU (Kawasaki, Japan)
and ZHANG Yupei (HKUST).
If there exist xm, xn≥2, then we can replace
them by xm+xn-1, 1 due to
(xm+xn-1)2+12-(xm2+xn2)
= 2(xm-1)(xn-1) ≥ 0.
So the maximum case can be attained by one 19 and thirty-nine 1’s. This gives the maximum value 39×12+1×192=400.
For the minimum case, there exists at least one 1, otherwise 58=x1+x2+⋯+x40≥2×40
=80, contradiction. Let xk be a largest term.
If xk≥3, then we can replace xk and 1 by
xk-1 and 2 to lower the square sums since
(xk2+12)-[(xk-1)2+22] = 2(xk-2) > 0.
So in the minimum case, there are twenty-two 1’s and eighteen 2’s yielding 22×12+18×22=94.
Other commended solvers: George
SHEN and Nicuşor ZLOTA (“Traian
Vuia” Technical College, Focşani, Romania).
Problem 512. Let AD, BE, CF be the
altitudes of acute ∆ABC. Points P and Q are on segments DF and EF respectively. If ∠PAQ=∠DAC, then prove that AP bisects ∠FPQ.
Solution. George SHEN and Toshihiro
SHIMIZU (Kawasaki, Japan). A B D C E H F S T P Q
Let H be the orthocenter of ∆ABC. Let S be the intersection of AP and CF. Let T be the intersection of AQ and CF. Now ∠AFC=90°=∠ADC. As AFDC is cyclic, ∠PAT=∠PAQ=∠DAC=∠DFC=∠PFT, points A, T, F, P are concyclic. Also, since ∠SFQ =∠HFE=∠HAE
=∠DAC =∠PAQ =∠SAQ,
points A, F, S, Q are concyclic. Then since ∠SQT =∠SFA=90°
=∠AFT =∠APT =∠SPT =∠SAQ, points S,P,T,Q are concyclic. Therefore, we have
∠FPA =∠FTA=∠STQ =∠SPQ, which implies AP bisects ∠FPQ.
Other commended solvers: Andrea
FANCHINI (Cantù, Italy), William
KAHN (Sidney, Australia), LEUNG
Hei Chun, George SHEN and
ZHANG Yupei (HKUST).
Problem 513. Let a0, a1, a2, … be a
sequence of nonnegative integers satisfying the conditions:
(1) an+1=3an-3an−1+an−2 for n>1,
(2) 2a1=a0+a2-2,
(3) for every positive integer m, in the sequence a0, a1, a2, …, there exist m
terms ak, ak+1, … , ak+m−1, which are
perfect squares.
Prove that every term in a0,a1,a2,… is a
perfect square.
Solution. William KAHN (Sidney, Australia), LEUNG Hei Chun,
George SHEN and Toshihiro
SHIMIZU (Kawasaki, Japan). We show we can select integers α, β, γ such that an=n(n-1)α/2+nβ+γ. For n=0,
we must have γ=a0. For n=1, we must
have a1=β+γ and we can set integer β
as a1-γ = a1-a0. Finally for n=2, we
must have a2=α+2β+γ and we can set
integer α = a2-2β-γ = a2-2(a1-a0) - a0.
Then since all three sequences bn=n2,
bn=n and bn=1 satisfy the relation
bn+1=3bn-3bn-1+bn-2, we also have an=
n(n-1)α/2 + nβ + γ = n2α/2+n(β-α/2)+γ
satisfies the relation.
From (2), we get 2(β+γ) = γ + α + 2β + γ - 2 or α = 2. Therefore, we have an =
n(n-1)+nβ+γ, which can be put in the form [(2n+t)2+s]/4 for some integers s
and t.
Assume s≠0. If
(2n+t-1)2 <(2n+t)2+s < (2n+t+1)2 (*),
then an cannot be a perfect square.
However, (*) is equivalent to -(4n+2t-1) < s < 4n+2t+1 or -2t+1-s<4n and s-2t-1<4n, which is valid for sufficiently large n. Therefore, (3) would lead to s=0. Since a0 = t2/4must be an integer, so t
Mathematical Excalibur, Vol. 21, No. 5, Apr. 18 – Jun. 18 Page 4 , ) ( 4 ) 2 2 ( n t 2 n t 2 an
which implies that every term in an is a
perfect square.
Other commended solvers: Arpon
BASU (AECS-4, Mumbai, India),
George SHEN and ZHANG Yupei
(HKUST).
Problem 514. Let n be a positive
integer and let p(x) be a polynomial with real coefficients on the interval [0,n] such that p(0)=p(n). Prove that there are n distinct ordered pairs (ai, bi)
with i=1,2,…,n such that 0≤ai<bi≤n,
bi-ai is an integer and p(ai)=p(bi).
Solution. Toshihiro SHIMIZU
(Kawasaki, Japan) and ZHANG Yupei (HKUST).
We can solve the problem with continuous functions in place of polynomials. We will prove this by using mathematical induction. The case n=1 is trivial. Suppose the case n-1 is true. Define f(x)=p(x+1)-p(x). Then
f(0)+f(1)+⋯+f(n-1)=p(n)-p(0)=0. (*) First we show there exists w∈[0,n-1] such that p(w)=p(w+1). In fact, if there exists k∈{0,1,2,…,n-1} such that f(k)=0, then taking w=k, we are done. Otherwise, from (*), we know there exists j∈{0,1,2,…,n-1} such that f(j)f(j+1)<0. Then there is w∈(j, j+1) such that f(w)=0. So p(w) = p(w+1). Next, define g(x)=p(x) for x∈[0,w] and g(x)=p(x+1) for x∈[w,n-1]. Then g(x) is continuous on [0,n-1] and g(0) = g(n-1). From induction hypothesis, there exist xi and yi with yi-xi∈ℕ
satisfying g(xi)=g(yi) for i=1,2,…,n-1.
Then there are three cases:
(1) for yi<w, 0 = g(yi) - g(xi) = p(yi) -
p(xi),
(2) for xi ≤ w ≤ yi, 0 = g(yi) - g(xi) =
p(yi+1) - p(xi) and
(3) for w < xi, 0 = g(yi) - g(xi) = p(yi+1)
- p(xi+1).
Together with p(0) = p(n), we get the case n completing the induction step. Other commended solvers: William
KAHN (Sidney, Australia) and
George SHEN.
Problem 515. There are ten distinct
nonzero real numbers. It is known that for every two of the numbers, either the sum or the product of them is rational. Prove that the square of each of the ten numbers is rational.
Solution. Toshihiro SHIMIZU
(Kawasaki, Japan) and ZHANG Yupei (HKUST).
Pick six of the nonzero distinct real numbers, say A1, A2, ⋯, A6 (with the
property that for i≠j, either AiAj∈ℚ or
Ai+Aj∈ℚ). Consider a graph with A1, A2,
⋯, A6 as vertices and color the edge with
vertices Ai, Aj blue if Ai+Aj∈ℚ, otherwise
red for AiAj∈ℚ. By Ramsay’s Theorem,
there is a red or a blue triangle in the complete graph with A1, A2, ⋯, A6 as
vertices.
There are two cases. In case 1, there is a blue triangle with vertices, say A1, A2 and
A3. Then A1+A2, A2+A3, A3+A1∈ℚ. So
2A1=(A1+A2)+(A3+A1)-(A2+A3)∈ℚ. Then
A1∈ℚ and similarly A2,A3 ∈ℚ.
Next, for any B∈{A4, A5, …, A10}, we see
A1+B∈ℚ or A1B∈ℚ. So B=(A1+B)-A1
∈ℚ or B=(A1B)/A1∈ℚ. Then all ten
Ai∈ℚ.
In case 2, there is a red triangle with vertices, say A1, A2 and A3. Then A1A2,
A2A3, A3A1∈ℚ. Now
A12=(A1A2)(A3A1)/(A2A3)∈ℚ
and similarly A22, A32∈ℚ. If at least one
of A1, A2, A3∈ℚ, say A1∈ℚ, then pick
any C∈{A2, A3, …, A10}. Observe that
A1+C∈ℚ or A1C∈ℚ. It follows that we
get C=(A1+C)-A1∈ℚ or C=(A1C)/A1∈ℚ.
Then all ten Ai∈ℚ.
Otherwise, if A12∈ℚ, but A1∉ℚ, then
A1=m√x, where m=1 or m=-1 and x∈ℚ.
Since A1A2∈ℚ, we get A1A2=(m√x)A2 =b
for some b∈ℚ. Then we get A2=b/(m√x)
=r√x, where r=b/(mx)∈ℚ and m≠r due to A1≠A2. For Ai≠A1, A2, if A1+Ai∈ℚ and
A2+Ai∈ℚ, then (A1+Ai)-(A2+Ai)∈ℚ, but
(A1+Ai)-(A2+Ai)= A1- A2 = (m-r)√x∉ℚ.
Finally, if A1Ai∈ℚ or A2Ai∈ℚ, then as
above we get Ai= si√x for some si∈ℚ
with si≠m,r. Then we have Ai2 =si 2 x∈ℚ.
Other commended solvers: Arpon BASU (AECS-4, Mumbai, India), CHUI Tsz
Fung (Ma Tau Chung Government
Primary School, P4), William KAHN
(Sidney, Australia), LUO On Ki and
George SHEN.
Olympiad Corner
(Continued from page 2) Problem 3. (Marko Radovanović) Call a function f:ℕ→ℕ lively if
f(a+b−1)=f(f(⋯f(b)⋯)) for all a,b∈ℕ, where f appears a times on the right side.
Suppose that g is a lively function such that g(A+2018)=g(A)+1 holds for some A≥2.
(a) Prove that g(n+20172017)=g(n) for
all n≥A+2.
(b) If g(A+20172017)≠g(A), determine
g(n) for n≤A−1.
Second Day
Problem 4. (Dušan Djukić) An n×n
square is divided into unit squares. One needs to place a number of isosceles right triangles with hypotenuse 2, with vertices at grid points, in such a way that every side of every unit square belongs to exactly one triangle (i.e. lies inside it or on its boundary). Determine all numbers n for which this is possible.
Problem 5. (Dušan Djukić) For a
positive integer n≥2, let C(n) be the smallest positive real constant such that there is a sequence of n real numbers x1,x2,…,xn, not all zero,
satisfying the following conditions: (i) x1+x2+⋯+xn=0;
(ii) for each i=1,2,…,n, it holds that xi≤xi+1 or xi≤xi+1+C(n)xi+2 (the indices
are taken modulo n). Prove that:
(a) C(n)≥2 for all n;
(b) C(n)=2 if and only if n is even.
Problem 6. (Bojan Bašić) Let k be a positive integer and let n be the smallest positive integer having exactly k divisors. If n is a perfect cube, can the number k have a prime divisor of the form 3j+2?
Sl:d:l(JY\_5,.
-to
OC;~~~J
voe.
t
s-1. We may assume that AB :S::,: AC. Let M and N be the midpoints of sides AC and
AB, respectively, and let M' be the A
point on segment D N such that D M'
=
DN. Since <i.M'DF
=
<i.MDE, trian-gles D ME and D M' F are congruent, so<r..FM'N
=
180° - <r..DM'F=
180°-<r..DME = <r..BAC = <r..FNM', which means that 6.F M' N is isosceles. The
midpoint I( of M' N is also the foot of B D -C
the perpendicular from F to M' N, so DF;;,:, DK= DM'iDN
=
AB!AC.Second solution. Assume that E lies on segment AM. Denote x = <r..M DE
=
<r..N D F. By the law of sines in 6.M DE and 6.N D F we havef}'f:,
=
sis\:~:i:)
andDN
=
sin{a+z) and therefore Jd:£. = DM+DN=
sin(a+:i:)~sin(a:-z) = COSX:;::: LDF sina: ' 4DE 2DE 2sina: "'=
Remark. One obtains 4 ·DE= ./(b
+
c)2+
(6-c)2 tg2a.2. Denote by (xk, Yk) the pair obtained after k steps. The sum Xk + Yk is invariant and equals s
=
n+b. Since 2 · (x+J)
=
2·f
=
x (mod x+y), we have 2xk=
Xk-I(mod s). A simple induction yields
2kxk
=
xo=
n (mods).Since (s,2k)
=
1, it is enough to prove the existence of an odd numbers, n < s < 2n, such that for some k we have 2kb=
n (mods), i.e. (2k+
l)n=
0 (mods). To this end, one can simply takes= 2r + 1 and k=
r, where 2r-l<
n<
2r (r EN). Thusb=2r+l-n.Remark. Clearly, one can take any s such that s
I
2k + 1 for some k E N. For example, s=
3i11i (i,j E No) works. From here, one can deduce that, given any constants O<
a< (3, for all big enough n, there is a desired number b withan< b
<
{Jn.3. If g(a)
=
g(a+
d) for some a,d E N, the problem condition gives g(a+
n)=
gn+l(a)
=
gn+l(a + d)=
g(a+
n+
d), implying that function g(x) is periodicwith period d for x ;;,:, a. Such a and d actually exist: Indeed, g(A
+
2019)=
g(g(A
+
2018))=
g(g(A)+
1) = g(g(g(A)))=
g(A+
2), so it follows from a.hove that g( n+
2017) = g( n) for n ~ A+ 2. Consider the smallest d for which such an aexists; let a = ao be the smallest such a. Since d is minimal, for x, y ;;,:, ao it holds
that g(x) = g(y) if-and only if d
Ix
-y. Clearly, dI
2017.We immediately have g(n
+
20172017) = g(n) for n ~A+ 2. On the other hand,since g(A
+
20172017) =I= g(A), we deduce that A :s;: ao - 1, i.e. ao E {A+ 1, A+ 2}.Suppose that g(a') = g(a'
+
cl!) for some a' :S::,: a0 - 1 and some d' E N. Thenfunction g(x) has period d' for x ~ a', which implies d
I
d', but then we have g(ao -1)=
g(ao -1+
d')=
g(a0 -1+
d), contradicting the minimality of a0 •Therefore, if g(x) = g(y) and x :S::,: a0 -1, then x = y. Now the equality g(g(n))
=
g(n+
1) for n+
1 :s;: A~ a0 - 1 implies g(n)=
n + 1.Remark. The problem condition is equivalent to g(g(n))
=
g(n+
1) for all n.For n ~ a0 - 1, equation g(g(n))
=
g(n+
1) implies g(n)=
n + 1 (mod d). Thusevery lively function g is of the form
g(n)
=
ao+
adfor n :s;: ao - 2;
for n
=
ao -1;{
n+l
ao +i
+
{3;d for n ~ a0 and n=
ao + i (mod d), 0 ~ i < d - 1,where a, {30 , ..• , f3d-i are arbitrary positive integers. It is straightforward to verify
that such a function is lively.
4. There are 2n( n
+
l) unit segments on the grid, and each triangle covers three, so we must have 3I
2n(n+
1), i.e. n=
0 or n=
2 (mod 3). Moreover, the segments on the boundary of the big square have 2 x 2 (n+
6) x (n+
6)to be covered by hypotenuses, so we ~ must also have 2
I
n. Therefore, n=
0or n
=
2 (mod 6).The left image shows desired arrange-ments of triangles for n
=
2 and n=
6, whereas the right image shows that ev-ery arrangement of triangles on an n x n squares can be extended to (n+6) x (n+ 6). A simple induction shows that ade-6x6
II
sired arrangement exists whenever n
=
6k or n = 6k - 4 for some k EN.5. The sequence cannot contain two adjacent non-positive terms. Indeed, if a.; __ 1 >
0 ~ a;,ai+1 , then a;-1 > max{a;,a;
+
C(n)lti+i}, contradicting (ii). Hence, theConsider an arbitrary block of positive terms ak, ak+l, ... , ak+L-l· We call the term
ak initial and ak+l-l finaL Let P be the sum of all initial terms in the sequence,
K be the swn of the final ones, N be the sum of all non-positive terms, and S be the sum of positive terms which are not initial or final.
Summing the inequalities ak+t-1 ~ ak+l
+
C(n)ak+l+l over all blocks yields K ~N
+
C(n)P. Since N=
-K - S - P, this relation becomes2K ~ (C(n) - l)P - S. (*)
Suppose now that C(n) ~ 2. Summing the inequalities ak+2i ~ ak+2i+I
+
2ak+2i+2for O ~ i ~ {1
2
3] and adding the inequality ak+l-2 ~ 2ak+t-1 if 2I
l, we obtainak ~ ak+l
+
ak+2+ · · · +
ak+l-2+
2ak+1-1- Summing over all blocks then yieldsP ~ S+2K. (**)
Equality in ( **) is . possible only if the length l of the block is odd. Indeed, if
2
I
l, all inequalities participating in the sum must be equalities, so in particularak+t-2
=
2ak+t-1 , which contradicts the condition ak+t-2 ~ ak+t-1>
0.Summing(*) and(**) gives us O ~ (C(n) - 2)P, and therefore C(n) ;:;, 2. More-over, if C(n)
=
2, all blocks must have odd lengths, which implies that n is even. Conversely, the example Xr=
(-lf shows that C(n)=
2 for even n.Remark. In the case 2 I n there are nontrivial examples: For instance, if n
=
4, one can take (x1 , x2, x3 , x4 )=
(3a+
2b, a, a+ b, -5a - 3b) for a E JR and b ;:J!, 0.It can be shown that C(3)
=
3, C(5)=
1±fIT
and liII1n ... oo C(n)=
2.6. Suppose that such a k exists. Let P1
<
P2< . . .
be all primes in the increasing order and let n=
n~:
1 pf' (am> o),
where k=
(a1 + 1) ···(om+ 1) and 3 I ai for all i. By the minimality of n we have a 1 ;:J!: ••• ;:J!: am>
0.Lemma. Suppose that ar
+
1=
ab for a,b EN\ {1}. If Ps <p:
< Ps+l, thenO:s ;:J!: b - I ;:J!: Os+l ·
Proof. The number n1
=
p~a.+l)a-lP!-1 ILfi!{r,s} P? also has k divisors, so it satis-fies n1 ;:J!: n. However, this reduces to (p:/Ps)°'·-b+1 ;:J!: 1, i.e. as ;:J!, b - l.S. ·1 l 1ml ar y, n 1 ,
=
Pr {a.+1+l)a-l Ps+l b-lTI
ito:{r,s+i}Pi -.;::--r, -....
n y1e s·
Id O:s+l "::: ,,- b - l . D Consider the largest r such that Or+ 1=
ab for some a= b=
2 (mod 3), and let sand t be such that Ps < p~ < Ps+i and Pt< p~ < Pt+i· Observe that Bertrand's postulate implies !P~<
p8 and Ps+i<
2p:, hencep~-l < Ps < p~ < Ps+l < p:+1 and analogously p~-l <Pt< p~ < Pt+l
<
p~+l_It follows that s, t > r. We similarly obtain Is -
ti
=I= l.By the Lemma (since 3
I
Oi) we have as > b - 1 > Os+1 and at > a - 1 >N be (as+l)(a:t+i+l)-1 b-1 a-1
IT
r,
also has k d" •at+l · um r ~
=
Pr Ps Pt+l i~{r,s,t+l} Pi • 1v1Sors, so n2 ~ n, i.e.{a.+l)(a,+1+1)-ab o.-l-at+1
l ~ n2
=
Pr Pt+in p~.-b+l
(a.+l){a,+1 +1)-ab+(b+l )(a-l-a,+1)
Pr
<
{a-l)(a:,-b+l)Pr
1-(a.-b){a-2-a:,+1)
=Pr '
whence (as - b)(a - 2 - ll!t+1)
<
1. Since 3I
Os =/= b, we must have at+1=
a - 2.By the assumption, ai + 1 has no divisors of the form 3j + 2 if i
> r,
so if must odd. In particular, 2 I Ot+1, so 2 I a. Analogously, 2I
b, soar= 4c -1 for some cEN.Since 2
I
l.l!m implies a,,.>
3>
1>
l.l!m+1=
0, the Lemma for ( a, b)=
(2, 2c)and (a,b)
=
(4,c) respectively gives us Pm< p;.c<
Pm+l and Pm< P~<
Pm+l·However, this is impossible, as by the Bertrand's postulate the interval (p~,p;c)