## IMO 2018 Problems – Day 2

**Problem 4.** A *site* is any point in the plane such that and are both positive integers less than or equal to 20.

Initially, each of the 400 sites is unoccupied. Amy and Ben take turns placing stones with Amy going first. On her turn, Amy places a new red stone on an unoccupied site such that the distance between any two sites occupied by red stones is not equal to . On his turn, Ben places a new blue stone on any unoccupied site. (A site occupied by a blue stone is allowed to be at any distance from any other occupied site.) They stop as soon as a player cannot place a stone.

Find the greatest such that Amy can ensure that she places at least red stones, no matter how Ben places his blue stones.

**Problem 5.** Let be an infinite sequence of positive integers. Suppose that there is an integer such that, for each , the number

is an integer. Prove that there is a positive integer such that for all .

**Problem 6.** A convex quadrilateral satisfies . Point lies inside so that and . Prove that .

Source: AoPS

## IMO 2018 Problems – Day 1

**Problem 1.** Let be the circumcircle of acute triangle . Points and are on segments and respectively such that . The perpendicular bisectors of and intersect minor arcs and of at points and respectively. Prove that lines and are either parallel or they are the same line.

**Problem 2.** Find all integers for which there exist real numbers satisfying , and

For .

**Problem 3.** An *anti-Pascal* triangle is an equilateral triangular array of numbers such that, except for the numbers in the bottom row, each number is the absolute value of the difference of the two numbers immediately below it. For example, the following is an anti-Pascal triangle with four rows which contains every integer from to

Does there exist an anti-Pascal triangle with rows which contains every integer from to ?

Source: AoPS.

## Balkan Mathematical Olympiad 2018

**Problem 1.** A quadrilateral is inscribed in a circle , where and is not parallel to . Point is the intersection of the diagonals and and the perpendicular from to intersects the segment at the point . If bisects the angle , prove that is a diameter of the circle .

**Problem 2.** Let be a positive rational number. Two ants are initially at the same point in the plane. In the -th minute each of them chooses whether to walk due north, east, south or west and then walks the distance of meters. After a whole number of minutes, they are at the same point in the plane (non necessarily ), but have not taken exactly the same route within that time. Determine all the possible values of .

**Problem 3.** Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, each player chooses a pile with an even number of coins and moves half of the coins of this pile to the other pile. The came ends if a player cannot move, in which case the other player wins.

Determine all pairs of positive integers such that if initially the two piles have and coins, respectively, then Bob has a winning strategy.

**Problem 4.** Find all primes and such that divides .

Source: https://bmo2018.dms.rs/wp-content/uploads/2018/05/BMOproblems2018_English.pdf

## Sum of the Euler Totient function

Given a positive integer , the Euler totient function is defined as the number of positive integers less than which are co-prime with (i.e. they have no common factors with ). There are formulas for computing starting from the factorization of . One such formula is

where the product is made over all primes dividing .

If you have to compute for all numbers less than a threshold then another property could be useful: is arithmetic, that is, whenever . Therefore you could store all values computed until and for computing the value there are two possibilities: is a prime power and then or is composite and with . Then use the stored values to compute .

I now come to the main point of this post: computing the sum of all values of the totient function up to a certain :

One approach is to compute each and sum them. I will call this the *brute-force* approach. For all numerical purposes I will use Pari-GP in this post. On my computer it takes less than a second to compute and about seconds to compute . This is super linear in time, since the algorithm computes the factorization for each and then sums the values. Using the sieve approach could improve the timing a bit, but the algorithm is still super linear.

In some Project Euler problems it is not uncommon to have to compute something like or even larger. Therefore, there must be more efficient ways to compute out there, so let’s study some of the properties of . In another post I dealt with the acceleration of the computation of the sum of the divisor function.

We have which is the number of pairs with such that . It is not difficult to see that the total number of such pairs is . Moreover, the possible values of are . Now, if for we search instead for pairs satisfying then we have with and we get

There fore the number of pairs with gcd equal to is . Now we arrive at an interesting recursive formula:

At a first sight this looks more complicated, but there is a trick to keep in mind whenever you see a summation over of terms of the form : these quantities are constant on large intervals. Indeed,

Therefore we can change the index of summation from to . The range of for which the interval contains more than one integer is of order . Indeed, . Therefore for we should have at least one integer in the interval . The part where is larger than corresponds to smaller than . Therefore, we can split into two sums, each of order . and get that

where in the last sum we must make sure that in order to avoid duplicating terms in the sum.

Therefore we replaced a sum until to two sums with upper bound . The complexity is not , but something like since we have a recursive computation. Nevertheless, with this new formula and using memoization, to keep track of the values of already computed, we can compute very fast:

is computed instantly (vs second with brute force)

takes second (vs seconds with brute force)

takes seconds (vs over minutes with brute force)

takes seconds

takes about minutes

etc. Recall that these computations are done in Pari GP, which is not too fast. If you use C++ you can compute in seconds, in second and in seconds and in under a minute, if you manage to get past overflow errors.

## Spherical triangles of area Pi

Recently I stumbled upon this page and found out a very nice result:

If a spherical triangle has area then four copies of it can tile the sphere.

Here we are talking about triangles on the unit sphere whose edges are geodesics. The above result is a simple consequence of the following facts:

- If a spherical triangle has angles then its area is . Therefore if a triangle has area , then .
- If is a triangle of area and is obtained by symmetrizing with respect to the midpoint of on the sphere, then and are congruent triangles.
- Using angles and the fact that on the sphere similar triangles are congruent, we obtain that the triangles are all congruent.

Here are a few examples of such partitions:

## Romanian Masters in Mathematics contest – 2018

**Problem 1.** Let be a cyclic quadrilateral an let be a point on the side The diagonals meets the segments at The line through parallel to mmets the extension of the side beyond at The line through parallel to meets the extension of the side beyond at Prove that the circumcircles of the triangles and are tangent .

**Problem 2.** Determine whether there exist non-constant polynomials and with real coefficients satisfying

**Problem 3.** Ann and Bob play a game on the edges of an infinite square grid, playing in turns. Ann plays the first move. A move consists of orienting any edge that has not yet been given an orientation. Bob wins if at any point a cycle has been created. Does Bob have a winning strategy?

**Problem 4.** Let be positive integers such that and . Let be the set of values attained by as runs through the positive integers. Show that is the set of all positive divisors of some positive integer.

**Problem 5.** Let be positive integer and fix distinct points on a circle. Determine the number of ways to connect the points with arrows (oriented line segments) such that all of the following conditions hold:

- each of the points is a startpoint or endpoint of an arrow;
- no two arrows intersect;
- there are no two arrows and such that , , and appear in clockwise order around the circle (not necessarily consecutively).

**Problem 6.** Fix a circle , a line to tangent , and another circle disjoint from such that and lie on opposite sides of . The tangents to from a variable point on meet at and . Prove that, as varies over , the circumcircle of is tangent to two fixed circles.

Source: Art of Problem Solving forums

**Some quick ideas:** For Problem 1 just consider the intersection of the circle with the circle . You’ll notice immediately that this point belongs to the circle . Furthermore, there is a common tangent to the two circles at this point.

For Problem 2 we have . Eliminate the highest order term from both sides and look at the next one to get a contradiction.

Problem 4 becomes easy after noticing that if divides and then divides .

In Problem 5 try to prove that the choice of start points determines that of the endpoints. Then you have a simple combinatorial proof.

Problem 6 is interesting and official solutions use inversions. Those are quite nice, but it may be worthwhile to understand what happens in the non-inverted configuration.

I will come back to some of these problems in some future posts.

## SEEMOUS 2018 – Problems

**Problem 1.** Let be a Riemann integrable function. Show that

**Problem 2.** Let and let the matrices , , , be such that

Prove that .

**Problem 3.** Let such that and , where is the identity matrix. Prove that if then .

**Problem 4.** (a) Let be a polynomial function. Prove that

(b) Let be a function which has a Taylor series expansion at with radius of convergence . Prove that if converges absolutely then converges and

Source: official site of SEEMOUS 2018

**Hints: **1. Just use and . The strict inequality comes from the fact that the Riemann integral of strictly positive function cannot be equal to zero. This problem was too simple…

2. Use the fact that , therefore is symmetric and positive definite. Next, notice that . Notice that is diagonalizable and has eigenvalues among . Since it is also positive definite, cannot be an eigenvalue. This allows to conclude.

3. First note that the commutativity allows us to diagonalize using the same basis. Next, note that both have eigenvalues of modulus one. Then the trace of is simply the sum where are eigenvalues of and , respectively. The fact that the trace equals and the triangle inequality shows that eigenvalues of are a multiple of eigenvalues of . Finish by observing that they have the same eigenvalues.

4. (a) Integrate by parts and use a recurrence. (b) Use (a) and the approximation of a continuous function by polynomials on compacts to conclude.

I’m not sure about what others think, but the problems of this year seemed a bit too straightforward.