Let $n$ be a positive integer.
A Japanese triangle consists of $1 + 2 + \dots + n$ circles arranged in an
equilateral triangular shape such that for each $1 \le i \le n$,
the $i$\ts{th} row contains exactly $i$ circles, exactly one of which is colored red.
A ninja path in a Japanese triangle is a sequence of $n$ circles
obtained by starting in the top row, then repeatedly going from a circle to
one of the two circles immediately below it and finishing in the bottom row.
Here is an example of a Japanese triangle with $n = 6$,
along with a ninja path in that triangle containing two red circles.
[Figure omitted]
In terms of $n$, find the greatest $k$ such that in each Japanese triangle
there is a ninja path containing at least $k$ red circles.

Solution:
The answer is
$ k = \left\lfloor \log_2(n) \right\rfloor + 1. $

Construction.:
It suffices to find a Japanese triangle for $n = 2^e-1$
with the property that at most $e$ red circles in any ninja path.
The construction shown below for $e=4$ obviously generalizes,
and works because in each of the sets $\{1\}$, $\{2,3\}$, $\{4,5,6,7\}$,
\dots, $\{2^{e-1},\dots,2^e-1\}$, at most one red circle can be taken.
(These sets are colored in different shades of red for visual clarity).

[Figure omitted]

Bound.:
Conversely, we show that in any Japanese triangle,
one can find a ninja path containing at least
$ k = \left\lfloor \log_2(n) \right\rfloor + 1. $
The following short solution was posted at ,
apparently first found by the team leader for Iran.

We construct a rooted binary tree $T_1$ on the set of all circles as follows.
For each row, other than the bottom row:

Connect the red circle to both circles under it;
White circles to the left of the red circle in its row are connected to the left;
White circles to the right of the red circle in its row are connected to the right.

The circles in the bottom row are all leaves of this tree.
For example, the $n=6$ construction in the beginning gives the tree
shown on the left half of the figure below:
[Figure omitted]

Now focus on only the red circles, as shown in the right half of the figure.
We build a new rooted tree $T_2$ where each red circle is joined to the
red circle below it if there was a path of (zero or more)
white circles in $T_1$ between them.
Then each red circle has at most $2$ direct descendants in $T_2$.
Hence the depth of the new tree $T_2$ exceeds $\log_2(n)$, which produces the desired path.

Another recursive proof of bound, communicated by Helio Ng.:
We give another proof that $\lfloor \log_2 n\rfloor + 1$ is always achievable.
Define $f(i, j)$ to be the maximum number of red circles contained in
the portion of a ninja path from $(1, 1)$ to $(i, j)$,
including the endpoints $(1, 1)$ and $(i, j)$.
(If $(i,j)$ is not a valid circle in the triangle, define $f(i, j)=0$ for convenience.)
An example is shown below with the values of $f(i,j)$ drawn in the circles.

[Figure omitted]

We have that
$ f(i, j) = \max \left\{f(i-1,j-1), f(i,j-1) \right\} +

1 & \text{if $(i,j)$ is red} \\
0 & \text{otherwise}
$
since every ninja path passing through $(i, j)$ also passes through
either $(i-1,j-1)$ or $(i,j-1)$. Now consider the quantity
$S_j = f(0, j) + \dots + f(j, j)$. We obtain the following recurrence:

$S_{j+1} \geq S_j + \left\lceil \frac{S_j}{j} \right\rceil + 1$.

Consider a maximal element $f(m, j)$ of $ \{f(0, j), \dots, f(j, j) \}$.
We perform the following manipulations:

S_{j+1}
&= \sum_{i=0}^{j+1} \max \left\{f(i-1,j), f(i,j) \right\} + \sum_{i=0}^{j+1}

1 & \text{if $(i,j+1)$ is red} \\
0 & \text{otherwise}
\\
&= \sum_{i=0}^{m} \max \left\{f(i-1,j), f(i,j) \right\} +
\sum_{i=m+1}^{j} \max \left\{f(i-1,j), f(i,j) \right\} + 1 \\
&\geq \sum_{i=0}^{m} f(i,j) + \sum_{i=m+1}^{j} f(i-1,j) + 1 \\
&= S_j + f(m, j) + 1 \\
&\geq S_j + \left\lceil \frac{S_j}{j} \right\rceil + 1

where the last inequality is due to Pigeonhole.

This is actually enough to solve the problem.
Write $n = 2^c + r$, where $0 \leq r \leq 2^c - 1$.

$S_n \geq cn + 2r + 1$. In particular, $\left\lceil \frac{S_n}{n} \right\rceil \geq c + 1$.

First note that $S_n \geq cn + 2r + 1$ implies
$\left\lceil \frac{S_n}{n} \right\rceil \geq c + 1$ because
$ \left\lceil \frac{S_n}{n} \right\rceil \geq \left\lceil \frac{cn + 2r + 1}{n} \right\rceil
= c + \left\lceil \frac{2r + 1}{n} \right\rceil = c + 1.
$
We proceed by induction on $n$.
The base case $n = 1$ is clearly true as $S_1 = 1$.
Assuming that the claim holds for some $n=j$, we have

S_{j+1} &\geq S_j + \left\lceil \frac{S_j}{j} \right\rceil + 1 \\
&\geq cj + 2r + 1 + c + 1 + 1 \\
&= c(j+1) + 2(r+1) + 1

so the claim is proved for $n=j+1$ if $j+1$ is not a power of $2$.
If $j+1 = 2^{c+1}$, then by writing
$c(j+1) + 2(r+1) + 1 = c(j+1) + (j+1) + 1 = (c+2)(j+1) + 1$, the claim is also proved.

Now $\left\lceil \frac{S_n}{n} \right\rceil \geq c + 1$ implies the existence of
some ninja path containing at least $c+1$ red circles, and we are done.


Let $ABC$ be an equilateral triangle.
Let $A_1$, $B_1$, $C_1$ be interior points of $ABC$
such that $BA_1=A_1C$, $CB_1=B_1A$, $AC_1=C_1B$, and
$ \angle BA_1C + \angle CB_1A + \angle AC_1B = 480\dg. $
Let $A_2 = BC_1 \cap CB_1$, $B_2 = CA_1 \cap AC_1$,
$C_2 = AB_1 \cap BA_1$.
Prove that if triangle $A_1B_1C_1$ is scalene,
then the circumcircles of triangles $AA_1A_2$, $BB_1B_2$, and $CC_1C_2$
all pass through two common points.

Solution:
This is the second official solution from the marking scheme,
also communicated to me by Michael Ren.
Define $O$ as the center of $ABC$ and set the angles

\alpha &\coloneq \angle A_1CB = \angle CBA_1 \\
\beta &\coloneq \angle ACB_1 = \angle B_1AC \\
\gamma &\coloneq \angle C_1AB = \angle C_1BA

so that
$ \alpha + \beta + \gamma = 30\dg. $
In particular, $\max(\alpha,\beta,\gamma) < 30\dg$,
so it follows that $A_1$ lies inside $\triangle OBC$, and similarly for the others.
This means for example that $C_1$ lies between $B$ and $A_2$, and so on.
Therefore the polygon $A_2C_1B_2A_1C_2B_1$ is convex.

[Figure omitted]

We start by providing the ``interpretation'' for the $480\dg$ angle in the statement:

Point $A_1$ is the circumcenter of $\triangle A_2BC$, and similarly for the others.

We have $\angle BA_1C = 180\dg - 2\alpha$, and

\angle BA_2C &= 180\dg - \angle CBC_1 - \angle B_1CB \\
&= 180\dg - ( 60\dg - \gamma ) - ( 60\dg - \beta ) \\
&= 60\dg + \beta + \gamma = 90\dg - \alpha = 1/2 \angle BA_1 C.

Since $A_1$ lies inside $\triangle BA_2C$, it follows $A_1$ is exactly the circumcenter.

Quadrilateral $B_2C_1B_1C$ can be inscribed in a circle, say $\gamma_a$.
Circles $\gamma_b$ and $\gamma_c$ can be defined similarly.
Finally, these three circles are pairwise distinct.

Using directed angles now, we have
$ ∠ B_2B_1C_2 = 180\dg-∠ AB_1B_2
= 180\dg - 2 ∠ ACB = 180\dg-2(60\dg-\alpha) = 60\dg+2\alpha. $
By the same token, $∠ B_2C_1C_2 = 60\dg+2\alpha$.
This establishes the existence of $\gamma_a$.

The proof for $\gamma_b$ and $\gamma_c$ is the same.
Finally, to show the three circles are distinct, it would be enough to
verify that the convex hexagon $A_2C_1B_2A_1C_2B_1$ is not cyclic.

Assume for contradiction it was cyclic. Then
$ 360\dg = \angle C_2A_1B_2 + \angle B_2C_1A_2 + \angle A_2B_1C_2
= \angle BA_1C + \angle CB_1A + \angle AC_1B = 480\dg $
which is absurd.
This contradiction eliminates the degenerate case, so the three circles are distinct.

For the remainder of the solution, let $\opname{Pow}(P, \omega)$
denote the power of a point $P$ with respect to a circle $\omega$.

Let line $AA_1$ meet $\gamma_b$ and $\gamma_c$ again at $X$ and $Y$,
and set $k_a \coloneq \frac{AX}{AY}$.
Consider the locus of all points $P$ such that
$ \mathcal C_a \coloneq \Big\{ \text{points } P \text{ in the plane satisfying }
\opname{Pow}(P, \gamma_b) = k_a \opname{Pow}(P, \gamma_c) \Big\}. $
We recall the coaxiality lemma\footnote{We quickly outline a proof of this lemma:
in the Cartesian coordinate system, the expression $\opname{Pow}((x,y), \omega)$
is an expression of the form $x^2 + y^2 + {\bullet} x + {\bullet} y + {\bullet}$
for some constants ${\bullet}$ whose value does not matter.
Substituting this into the equation
$\frac{k_a \opname{Pow}(P, \gamma_c) - \opname{Pow}(P, \gamma_b)}{k_a-1} = 0$
gives the equation of a circle provided $k_a \neq 1$,
and when $k_a = 1$, one instead recovers the radical axis.},
which states that (given $\gamma_b$ and $\gamma_c$ are not concentric)
the locus $\mathcal C_a$ must be either a circle (if $k_a \neq 1$) or a line (if $k_a=1$).

On the other hand, $A_1$, $A_2$, and $A$ all obviously lie on $\mathcal C_a$.
(For $A_1$ and $A_2$, the powers are both zero, and for the point $A$,
we have $\opname{Pow}(P, \gamma_b) = AX \cdot AA_1$
and $\opname{Pow}(P, \gamma_c) = AY \cdot AA_1$.)
So $\mathcal C_a$ must be exactly the circumcircle of $\triangle AA_1A_2$
from the problem statement.

We turn to evaluating $k_a$ more carefully.
First, note that
$ \angle A_1XB_1 = \angle A_1B_2B_1 = \angle CB_2B_1
= 90\dg - \angle B_2AC = 90\dg - (60\dg-\gamma) = 30\dg + \gamma. $
Now using the law of sines, we derive

\frac{AX}{AB_1} &= \frac{\sin \angle AB_1X}{\sin \angle AXB_1}
= \frac{\sin(\angle A_1XB_1 - \angle XAB_1)}{\sin \angle A_1XB_1} \\
&= \frac{\sin( (30\dg+\gamma)-(30\dg-\beta) )}{\sin (30\dg+\gamma)}
= \frac{\sin(\beta+\gamma)}{\sin (30\dg+\gamma)}.

Similarly, $AY = AC_1 \cdot \frac{\sin(\beta+\gamma)}{\sin(30\dg+\beta)}$, so
$ k_a = \frac{AX}{AY}
= \frac{AB_1}{AC_1} \cdot \frac{\sin(30\dg+\beta)}{\sin(30\dg+\gamma)}. $
Now define analogous constants $k_b$ and $k_c$
and circles $\mathcal C_b$ and $\mathcal C_c$.
Owing to the symmetry of the expressions, we have the key relation
$ k_a k_b k_c = 1. $

In summary, the three circles in the problem statement may be described as

\mathcal C_a &= (AA_1A_2)
= \left\{ \text{points $P$ such that } \opname{Pow}(P, \gamma_b) = k_a \opname{Pow}(P, \gamma_c) \right\} \\
\mathcal C_b &= (BB_1B_2)
= \left\{ \text{points $P$ such that } \opname{Pow}(P, \gamma_c) = k_b \opname{Pow}(P, \gamma_a) \right\} \\
\mathcal C_c &= (CC_1C_2)
= \left\{ \text{points $P$ such that } \opname{Pow}(P, \gamma_a) = k_c \opname{Pow}(P, \gamma_b) \right\}.

Since $k_a$, $k_b$, $k_c$ have product $1$,
it follows that any point on at least two of the circles
must lie on the third circle as well.
The convexity of hexagon $A_2C_1B_2A_1C_2B_1$ mentioned earlier ensures these
any two of these circles do intersect at two different points, completing the solution.


Find all real numbers $\alpha$ so that, for every positive integer $n$, the integer
$ \left\lfloor \alpha \right\rfloor + \left\lfloor 2 \alpha \right\rfloor
+ \left\lfloor 3 \alpha \right\rfloor + \dots + \left\lfloor n \alpha \right\rfloor $
is divisible by $n$.

Solution:
The answer is that $\alpha$ must be an even integer.
Let $S(n, \alpha)$ denote the sum in question.

Analysis for $\alpha$ an integer.:
If $\alpha$ is an integer, then the sum equals
$ S(n, \alpha) = (1+2+\dots+n) \alpha = \frac{n(n+1)}{2} \cdot \alpha $
which is obviously a multiple of $n$ if $2 \mid \alpha$;
meanwhile, if $\alpha$ is an odd integer then $n = 2$ gives a counterexample.

Main case.:
Suppose $\alpha$ is not an integer; we show the desired condition can never be true.
Note that replacing $\alpha$ with $\alpha \pm 2$ changes by
$ S(n \pm 2, \alpha) - S(n, \alpha) = 2(1+2+\dots+n) = n(n+1) \equiv 0 \pmod n $
for every $n$.
Thus, by shifting appropriately we may assume $-1 < \alpha < 1$ and $\alpha \notin \ZZ$.

If $0 < \alpha < 1$,
then let $m \ge 2$ be the smallest integer such that $m \alpha \ge 1$.
Then
$ S(m, \alpha) = \underbrace{0 + \dots + 0}_{m-1\text{ terms}} + 1 = 1 $
is not a multiple of $m$.

If $-1 < \alpha < 0$,
then let $m \ge 2$ be the smallest integer such that $m \alpha \le -1$.
Then
$ S(m, \alpha) = \underbrace{(-1) + \dots + (-1)}_{m-1\text{ terms}} + 0 = -(m-1) $
is not a multiple of $m$.


For which pairs of positive integers $(a,b)$ is the sequence
$ \gcd(a^n+b, b^n+a) \qquad n = 1, 2, \dotsc $
eventually constant?

Solution:
The answer is $(a,b)=(1,1)$ only, which obviously works since the sequence is always $2$.

Conversely, assume the sequence
$ x_n \coloneq \gcd(a^n+b, b^n+a) $ is eventually constant.
The main crux of the other direction is to consider
$ M \coloneq ab+1. $

[Motivation]
The reason to consider the number is the same technique used in IMO 2005/4,
namely the idea to consider ``$n = -1$''.
The point is that the two rational numbers
$ \frac 1a + b = \frac{ab+1}{b}, \qquad \frac 1b + a = \frac{ab+1}{a} $
have a large common factor: we could write ``$x_{-1} = ab + 1$'', loosely speaking.

Now, the sequence is really only defined for $n \ge 1$,
so one should instead take $n \equiv -1 \pmod{\varphi(M)}$
--- and this is exactly what we do.

Obviously $\gcd(a,M) = \gcd(b,M) = 1$.
Let $n$ be a sufficiently large multiple of $\varphi(M)$
so that $ x_{n-1} = x_n = x_{n+1} = \dotsb. $
We consider the first three terms;
the first one is the ``key'' one that gets the bulk of the work,
and the rest is bookkeeping and extraction.

Consider $x_{n-1}$.
Note that
$ a (a^{n-1} + b) = a^n + ab \equiv 1 + (-1) \equiv 0 \pmod M $
and similarly $b (b^n + a) \equiv 0 \pmod M$.
Hence $M \mid x_{n-1}$.

Consider $x_n$, which is now known to be divisible by $M$. Note that

0 &\equiv a^n + b \equiv 1 + b \pmod M \\
0 &\equiv b^n + a \equiv 1 + a \pmod M.

So $a \equiv b \equiv -1 \pmod M$.

Consider $x_{n+1}$, which is now known to be divisible by $M$. Note that
$ 0 \equiv a^{n+1} + b \equiv b^{n+1} + a \equiv a + b \pmod M. $
We knew $a \equiv b \equiv -1 \pmod M$,
hence this means $0 \equiv 2 \pmod M$, so $M = 2$.

From $M = 2$ we then conclude $a = b = 1$, as desired.

[No alternate solutions known]
At the time nobody seems to know any solution not depending critically
on $M = ab+1$ (or prime numbers dividing $M$, etc.).
They vary in execution once some term of the form $x_{k\varphi(n)-1}$ is taken,
but avoiding the key idea altogether does not currently seem possible.

A good example to consider for ruling out candidate ideas is $(a,b) = (18,9)$.


Let $a_1$, $a_2$, $a_3$, \dots\ be an infinite sequence of positive integers,
and let $N$ be a positive integer.
Suppose that, for each $n > N$,
the number $a_n$ is equal to the number of times $a_{n-1}$ appears
in the list $(a_1, a_2, \dots, a_{n-1})$.
Prove that at least one of the sequences $a_1$, $a_3$, $a_5$, \dots\
and $a_2$, $a_4$, $a_6$, \dots\ is eventually periodic.

Solution:
We present the solution from ``gigamilkmen'tgeg''
in ,
with some adaptation from the first shortlist official solution as well.
Set $M \coloneq \max(a_1, \dots, a_N)$.

Setup.:
We will visualize the entire process as follows.
We draw a stack of towers labeled $1$, $2$, \dots, each initially empty.
For $i=1,2,\dots$, we imagine the term $a_i$ as adding a block $B_i$ to tower $a_i$.

Then there are $N$ initial blocks placed, colored red.
The rest of the blocks are colored yellow:
if the last block $B_i$ was added to a tower that then reaches height $a_{i+1}$,
the next block $B_{i+1}$ is added to tower $a_{i+1}$.
We'll say $B_i$ contributes to the tower containing $B_{i+1}$.

In other words, the yellow blocks $B_i$ for $i > N$
are given coordinates $B_i = (a_i, a_{i+1})$ for $i>N$.
Note in particular that in towers $M+1$, $M+2$, \dots, the blocks are all yellow.

[Figure omitted]

We let $h_\ell$ denote the height of the $\ell$\ts{th} tower at a given time $n$.
(This is an abuse of notation and we should write $h_\ell(n)$ at time $n$,
but $n$ will always be clear from context.)

Up to alternating up and down.:
We start with two independent easy observations:
the set of numbers that occur infinitely often is downwards closed,
and consecutive terms cannot both be huge.

[Figure omitted]

If the $(k+1)$\ts{st} tower grows arbitrarily high, so does tower $k$.
In fact, there exists a constant $C$ such that $h_{k} \ge h_{k+1} - C$ at all times.

Suppose $B_n$ is a yellow block in tower $k+1$.
Then with at most finitely many exceptions, $B_{n-1}$ is a yellow block at height $k+1$,
and the block $B_r$ right below $B_{n-1}$ is also yellow;
then $B_{r+1}$ is in tower $k$.
Hence, with at most finitely many exceptions, the map
$ B_n \mapsto B_{n-1} \mapsto B_r \mapsto B_{r+1} $
provides an injective map taking each yellow block in tower $k+1$
to a yellow block in tower $k$.
(The figure above shows $B_{32} \to B_{31} \to B_{19} \to B_{20}$ as an example.)

If $a_n > M$ then $a_{n+1} \le M$.

Assume for contradiction there's a first moment where $a_n > M$ and $a_{n+1} > M$,
meaning the block $B_n$ was added to an all-yellow tower past $M$
that has height exceeding $M$.
(This is the X'ed out region in the figure above.)
In $B_n$'s tower, every (yellow) block (including $B_n$)
was contributed by a block placed in different towers at height $a_n > M$.
So before $B_n$, there were already $a_{n+1} > M$ towers of height more than $M$.
This contradicts minimality of $n$.

It follows that the set of indices with $a_n \le M$
has arithmetic density at least half, so certainly
at least some of the numbers must occur infinitely often.
Of the numbers in $\{1,2,\dots,M\}$,
define $L$ such that towers $1$ through $L$ grow unbounded
but towers $L+1$ through $M$ do not.
Then we can pick a larger threshold $N' > N$ such that

Towers $1$ through $L$ have height greater than $(M,N)$;
Towers $L+1$ through $M$ will receive no further blocks;
$a_{N'} \le L$.

After this threshold, the following statement is true:

[Alternating small and big]
The terms $a_{N'}$, $a_{N' + 2}$, $a_{N' + 4}$, \dots\ are all at most $L$ while
the terms $a_{N' + 1}$, $a_{N' + 3}$, $a_{N' + 5}$, \dots\ are all greater than $M$.

Automaton for $n \equiv N' \pmod 2$.:
From now on we always assume $n > N'$.
When $n \equiv N' \pmod 2$, i.e., when $a_n$ is small, we define the state
$ S(n) = (h_1, h_2, \dots, h_L; a_n). $
For example, in the figure below, we illustrate how
$ S(34) = (9,11;a_{34}=1) \longrightarrow S(36) = (9,12;a_{36}=2) $
[Figure omitted]

The final element $a_n$ simply reminds us which tower was most recently incremented.
At this point we can give a complete description of how to move from $S(n)$ to $S(n+2)$:

The intermediate block $B_{n+1}$ is placed in the tower
corresponding to the height $a_{n+1}$ of $B_n$;
That tower will have height $a_{n+2}$ equal to the number of towers
with height at least $a_{n+1}$; that is, it equals the cardinality of the set
$ \{ i \colon h_i \ge h_{a_n} \} $
We increment $h_{a_{n+2}}$ by $1$ and update $a_n$.

For example, the illustrated $S(34) \to S(36)$
corresponds to the block $B_{34}$ at height $h_1$ in tower $1$
giving the block $B_{35}$ at height $2$ in tower $h_1$,
then block $B_{36}$ at height $h_2 + 1$ being placed in tower $2$.

Pigeonhole periodicity argument.:
Because only the relative heights matter in the automata above,
if we instead define
$ T(n) = (h_1-h_2, h_2-h_3, \dots, h_{L-1}-h_L; a_n). $
then $T(n+2)$ can be determined from just $T(n)$.

So it would be sufficient to show $T(n)$ only takes on finitely many values
to show that $T(n)$ (and hence $a_n$) is eventually periodic.

Since we have the bound $h_{k+1} \le h_k + C$,
we are done upon proving the following lower bound:

For every $1 \le \ell < L$ and $n > N'$,
we have $h_\ell \le h_{\ell+1} + C \cdot (L-1)$.

Assume for contradiction that there is some moment $n > N'$ such that
$ h_\ell > h_{\ell+1} + C \cdot (L-1) $
and WLOG assume that $h_\ell$ was just updated at the moment $n$.
Together with $h_{k+1} \le h_k + C$ for all $k$ and triangle inequality, we conclude
$ \min(h_1, \dots, h_\ell) > q \coloneq \max(h_{\ell+1}, \dots, h_L). $
We find that the blocks now in fact alternate between being placed
among the first $\ell$ towers and in towers with indices greater than $q$ thereafter.
Hence the heights $h_{\ell+1}$, \dots, $h_L$ never grow after this moment.
This contradicts the definition of $L$.

In fact, it can be shown that the period is actually exactly $L$,
meaning the periodic part will be exactly a permutation of $(1,2,\dots,L)$.
For any $L$, it turns out there is indeed a permutation achieving that periodic part.


Let triangle $ABC$ with incenter $I$ satisfying $AB < AC < BC$.
Let $X$ be a point on line $BC$, different from $C$,
such that the line through $X$ and parallel to $AC$ is tangent to the incircle.
Similarly, let $Y$ be a point on line $BC$, different from $B$,
such that the line through $Y$ and parallel to $AB$ is tangent to the incircle.
Line $AI$ intersects the circumcircle of triangle $ABC$ again at $P$.
Let $K$ and $L$ be the midpoints of $AC$ and $AB$, respectively.
Prove that $\angle KIL + \angle YPX = 180^{\circ}$.

Solution:
Let $T$ be the reflection of $A$ over $I$, the most important point to add
since it gets rid of $K$ and $L$ as follows.

We have $\angle KIL = \angle BTC$,
and lines $TX$ and $TY$ are tangent to the incircle.

The first part is true since $\triangle BTC$ is the image of $\triangle KIL$
under a homothety of ratio $2$.
The second part is true because lines $AB$, $AC$, $TX$, $TY$
determine a rhombus with center $I$.

We thus delete $K$ and $L$ from the picture altogether; they aren't needed anymore.

[Figure omitted]

We have $BXPT$ and $CYPT$ are cyclic.

$∠ TYC = ∠ TYB = ∠ ABC = ∠ APC = ∠ TPC$ and similarly.
(Some people call this Reim's theorem.)

To finish, observe that
$ ∠ CTB = ∠ CTP + ∠ PTB = ∠ CYP + ∠ PXB
= ∠ XYP + ∠ XYP = ∠ XPY $
as desired.
(The length conditions $AC > AB > BC$ ensure that $B$, $X$, $Y$, $C$ are collinear
in that order, and that $T$ lies on the opposite side of $BC$ as $A$.
Hence the directed equality $∠ CTB = ∠ XPY$
translates to the undirected $\angle BTC + \angle XPY = 180\dg$.)


Turbo the snail is in the top row of a grid with $2024$ rows and $2023$ columns
and wants to get to the bottom row.
However, there are $2022$ hidden monsters, one in every row except the first and last,
with no two monsters in the same column.

Turbo makes a series of attempts to go from the first row to the last row.
On each attempt, he chooses to start on any cell in the first row,
then repeatedly moves to an orthogonal neighbor.
(He is allowed to return to a previously visited cell.)
If Turbo reaches a cell with a monster,
his attempt ends and he is transported back to the first row to start a new attempt.
The monsters do not move between attempts, and Turbo remembers whether or not each cell
he has visited contains a monster.
If he reaches any cell in the last row, his attempt ends and Turbo wins.

Find the smallest integer $n$ such that Turbo has a strategy which guarantees
being able to reach the bottom row in at most $n$ attempts,
regardless of how the monsters are placed.

Solution:
Surprisingly the answer is $n = 3$ for any grid size $s \times (s-1)$ when $s \ge 4$.
We prove this in that generality.

Proof that at least three attempts are needed.:
When Turbo first moves into the second row, Turbo could encounter a monster $M_1$ right away.
Then on the next attempt, Turbo must enter the third row in different column as $M_1$,
and again could encounter a monster $M_2$ right after doing so.
This means no strategy can guarantee fewer than three attempts.

Strategy with three attempts.:
On the first attempt, we have Turbo walk through the entire second row
until he finds the monster $M_1$ in it.
Then we get two possible cases.

\subparagraph{Case where $M_1$ is not on the edge.}
In the first case, if that monster $M_1$ is not on the edge of the row,
then Turbo can trace two paths below it as shown below.
At least one of these paths works, hence three attempts is sufficient.

[Figure omitted]

\subparagraph{Case where $M_1$ is on the edge.}
WLOG, $M_1$ is in the leftmost cell.
Then Turbo follows the green staircase pattern shown in the left figure below.
If the staircase is free of monsters, then Turbo wins on the second attempt.
Otherwise, if a monster $M_2$ is encountered on the staircase,
Turbo has found a safe path to the left of $M_2$;
then Turbo can use this to reach the column $M_1$ is in, and escape from there.
This is shown in purple in the center and right figure
(there are two slightly different cases depending on whether $M_2$
was encountered going east or south).
[Figure omitted]
Thus the problem is solved in three attempts, as promised.

Extended remark: all working strategies look similar to this.:
As far as we know, all working strategies are variations of the above.
In fact, we will try to give a description of the space of possible strategies,
although this needs a bit of notation.

For simplicity, we only use $s$ even in the figures below.
We define the happy triangle as the following cells:

\item All $s-1$ cells in the first row (which has no monsters).
\item The center $s-3$ cells in the second row.
\item The center $s-5$ cells in the third row.
\item \dots
\item The center cell in the $\frac s2$\textsuperscript{th} row.

For $s=12$, the happy triangle is the region shaded in the thick border below.
[Figure omitted]

Given a cell, define a shoulder to be the cell directly northwest or northeast of it.
Hence there are two shoulders of cells outside the first and last column,
and one shoulder otherwise.

Then solutions roughly must distinguish between these two cases:

\item \textbf{Inside happy triangle:}
If the first monster $M_1$ is found in the happy triangle,
and there is a safe path found by Turbo to the two shoulders
(marked $\bigstar$ in the figure),
then one can finish in two more moves by considering the two paths from $\bigstar$
that cut under the monster $M_1$; one of them must work.
This slightly generalizes the easier case in the solution above
(which focuses only on the case where $M_1$ is in the first row).
[Figure omitted]

\item \textbf{Outside happy triangle:}
Now suppose the first monster $M_1$ is outside the happy triangle.
Of the two shoulders, take the one closer to the center
(if in the center column, either one works; if only one shoulder, use it).
If there is a safe path to that shoulder,
then one can take a staircase pattern towards the center, as shown in the figure.
In that case, the choice of shoulder and position guarantees the staircase
reaches the bottom row, so that if no monster is along this path, the algorithm ends.
Otherwise, if one encounters a second monster along the staircase,
then one can use the third trial to cut under the monster $M_1$.
[Figure omitted]

We now prove the following proposition:
in any valid strategy for Turbo,
in the case where Turbo first encounters a monster upon leaving the happy triangle,
the second path must outline the same staircase shape.

The monsters pre-commit to choosing their pattern to be
either a NW-SE diagonal or NE-SW diagonal, with a single one-column gap;
see figure below for an example.
Note that this forces any valid path for Turbo to pass through the particular gap.

[Figure omitted]

We may assume without loss of generality that Turbo first encounters a monster $M_1$
when Turbo first leaves the happy triangle, and that this forces an NW-SE configuration.

[Figure omitted]

Then the following is true:

The strategy of Turbo on the second path must
visit every cell in ``slightly raised diagonal'' marked with
$\clubsuit$ in the figure above
in order from top to bottom, until it encounters a second Monster $M_2$
(or reaches the bottom row and wins anyway).
It's both okay and irrelevant if Turbo visits other cells above this diagonal,
but the marked cells must be visited from top to bottom in that order.

If Turbo tries to sidestep by visiting the cell southeast of $M_1$
(marked {X} in the Figure),
then Turbo clearly cannot finish after this (for $s$ large enough).
Meanwhile, suppose Turbo tries to ``skip'' one of the $\clubsuit$,
say in column $C$, then the gap could equally well be in the column to the left of $C$.
This proves the proposition.

[Memories of safe cells are important, not just monster cells]
Here is one additional observation that one can deduce from this.
We say a set $\mathcal S$ of revealed monsters is called obviously winnable if,
based on only the positions of the monsters
(and not the moves or algorithm that were used to obtain them),
one can identify a guaranteed winning path for Turbo using only $\mathcal S$.
For example, two monsters in adjacent columns which are not diagonally
adjacent is obviously winnable.

Then no strategy can guarantee obtaining an obviously winnable set in $2$ moves
(or even $k$ moves for any constant $k$, if $s$ is large enough in terms of $k$).
So any valid strategy must also use the memory of identified safe cells
that do not follow just from the revealed monster positions.


A function $f \colon \QQ \to \QQ$ is called aquaesulian
if the following property holds: for every $x,y \in \mathbb{Q}$,
$ f(x+f(y)) = f(x) + y \quad \text{or} \quad f(f(x)+y) = x + f(y). $
Show that there exists an integer $c$ such that for any aquaesulian function $f$
there are at most $c$ different rational numbers of the
form $f(r) + f(-r)$ for some rational number $r$,
and find the smallest possible value of $c$.

Solution:
We will prove that
$ \left\{ f(x) + f(-x) \mid x \in \QQ \right\} $
contains at most $2$ elements
and give an example where there are indeed $2$ elements.

We fix the notation $x \to y$ to mean that $f(x+f(y)) = f(x)+y$.
So the problem statement means that either $x \to y$ or $y \to x$ for all $x$, $y$.
In particular, we always have $x \to x$, and hence
$ f(x+f(x)) = x+f(x) $
for every $x$.

Construction.:
The function
$ f(x) = \left\lfloor 2x \right\rfloor - x $
can be seen to satisfy the problem conditions.
Moreover, $f(0)+f(0) = 0$ but $f(1/3)+f(-1/3) = -1$.

Here is how I (Evan) found the construction.
Let $h(x) \coloneq x+f(x)$, and let $S \coloneq h(\QQ) = \{h(x) \mid x \in \QQ\}$.
Hence $f$ is the identity on all of $S$.
If we rewrite the problem condition in terms of $h$ instead of $f$,
it asserts that at least one of the equations

h(x+h(y)-y) &= h(x)+h(y) \\
h(y+h(x)-x) &= h(x)+h(y)

is true.
In particular, $S$ is closed under addition.

Now, the two trivial solutions for $h$ are $h(x) = 2x$ and $h(x) = 0$.
To get a nontrivial construction, we must also have $S \neq \{0\}$ and $S \neq \QQ$.
So a natural guess is to take $S = \ZZ$.
And indeed $h(x) = \left\lfloor 2x \right\rfloor$ works fine.

This construction is far from unique. For example,
$f(x) = 2\left\lfloor x \right\rfloor - x = \left\lfloor x \right\rfloor - \{x\}$
seems to have been more popular to find.

Proof (communicated by Abel George Mathew).:
We start by proving:

$f$ is injective.

Suppose $f(a) = f(b)$. WLOG $a \to b$. Then
$ f(a)+a = f(a+f(a)) = f(a+f(b)) = f(a)+b \implies a=b. \qedhere. $

Suppose $s \to r$.
Then either $f(r) + f(-r) = 0$ or $f(f(s)) = s+f(r)+f(-r)$.

Take the given statement with $x = s+f(r)$ and $y = -r$; then

x + f(y) &= s + f(r) + f(-r) \\
y + f(x) &= f(s+f(r)) - r = f(s).

Because $f$ is injective, if $x \to y$ then $f(r) + f(-r) = 0$.
Meanwhile, if $y \to x$ then indeed $f(f(s)) = s + f(r) + f(-r)$.

Finally, suppose $a$ and $b$ are different numbers for which
$f(a)+f(-a)$ and $f(b)+f(-b)$ are both nonzero.
Again, WLOG $a \to b$.
Then
$ f(a) + f(-a) \overset{a \to a}{=} f(f(a))-a \overset{a \to b}{=} f(b) + f(-b). $
This shows at most two values can occur.

The above solution works equally well for $f \colon \RR \to \RR$.
But the choice of $\QQ$ permits some additional alternate solutions.

After showing $f$ injective,
a common lemma proved is that $-f(-f(x)) = x$, i.e.\ $f$ is an involution.
This provides some alternative paths for solutions.


A line in the plane is called sunny
if it is not parallel to any of the $x$–axis, the $y$–axis, or the line $x+y=0$.

Let $n \ge 3$ be a given integer.
Determine all nonnegative integers $k$ such that there exist $n$ distinct lines
in the plane satisfying both of the following:

for all positive integers $a$ and $b$ with $a+b\le n+1$,
the point $(a,b)$ lies on at least one of the lines; and
exactly $k$ of the $n$ lines are sunny.

Solution:
The answer is $0$, $1$, or $3$ sunny lines.

In what follows, we draw the grid as equilateral instead of a right triangle;
this has no effect on the problem statement but is more symmetric.

We say a long line is one of the three lines at the edge of the grid,
i.e.\ one of the (non-sunny) lines passing through $n$ points.
The main claim is the following.

If $n \ge 4$, any set of $n$ lines must have at least one long line.

Consider the $3(n-1)$ points on the outer edge of the grid.
If there was no long line, each of the $n$ lines passes through at most two such points.
So we obtain $2n \ge 3(n-1)$, which forces $n \le 3$.

Hence, by induction we may repeatedly delete a long line without changing the number
of sunny lines until $n = 3$ (and vice-versa: given a construction for smaller $n$
we can increase $n$ by one and add a long line).

We now classify all the ways to cover
the $1+2+3=6$ points in an $n=3$ grid with $3$ lines.
[Figure omitted]

If there is a long line
(say, the red one in the figure),
the remaining $1+2=3$ points (circled in blue) are covered with two lines.
One of the lines passes through $2$ points and must not be sunny;
the other line may or may not be sunny.
Hence in this case the possible counts of sunny lines are $0$ or $1$.

If there is no long line, each of the three lines passes through at most $2$ points.
But there are $6$ total lines, so in fact each line must pass through
exactly two points.
The only way to do this is depicted in the figure in the right.
In this case there are $3$ sunny lines.

This proves that $0$, $1$, $3$ are the only possible answers.

The concept of a sunny line is not that important to the problem.
The proof above essentially classifies all the ways to cover
the $1+2+\dots+n$ points with exactly $n$ lines.
Namely, one should repeatedly take a long line and decrease $n$ until $n=3$,
and then pick one of the finitely many cases for $n=3$.
The count of sunny lines just happens to be whatever is possible for $n=3$,
since long lines are not sunny.


Let $\Omega$ and $\Gamma$ be circles with centres $M$ and $N$, respectively,
such that the radius of $\Omega$ is less than the radius of $\Gamma$.
Suppose $\Omega$ and $\Gamma$ intersect at two distinct points $A$ and $B$.
Line $MN$ intersects $\Omega$ at $C$ and $\Gamma$ at $D$,
so that $C$, $M$, $N$, $D$ lie on $MN$ in that order.
Let $P$ be the circumcenter of triangle $ACD$.
Line $AP$ meets $\Omega$ again at $E \neq A$ and meets $\Gamma$ again at $F \neq A$.
Let $H$ be the orthocenter of triangle $PMN$.

Prove that the line through $H$ parallel to $AP$ is tangent
to the circumcircle of triangle $BEF$.

Solution:
Throughout the solution, we define

\alpha &\coloneq ∠ DCA = ∠ BCD \implies ∠ PAD = ∠ CAB = 90\dg - \alpha \\
\beta &\coloneq ∠ ADC = ∠ CDB \implies ∠ CAP = ∠ BAD = 90\dg - \beta.

Ignore the points $H$, $M$, $N$ for now and focus on the remaining ones.

We have $CE \parallel AD$ and $DF \parallel AC$.

$∠ AEC = ∠ ABC = ∠ CAB = 90\dg - \alpha$.

Hence, if we let $A' \coloneq CE \cap DF$, we have a parallelogram $ACA'D$.
Note in particular that $BA' \parallel CD$.

[Figure omitted]

Next, let $T$ denote the circumcenter of $\triangle A'EF$.
(This will be the tangency point later in the problem.)

Point $T$ also lies on $BA'$ and is also the arc midpoint of $\widehat{EF}$ on $(BEF)$.

We compute the angles of $\triangle A'EF$:

∠ FEA' &= ∠ AEC = ∠ ABC = ∠ CAB = 90\dg - \alpha \\
∠ A'FE &= ∠ DFA = ∠ DBA = ∠ BAD = 90\dg - \beta \\
∠ EA'F &= \alpha + \beta.

Then, since $T$ is the circumcenter, it follows that:
$ ∠ EA'T = ∠ 90\dg - ∠ A'FE = \beta = ∠ A'CD = ∠ CA'B. $
This shows that $T$ lies on $BA'$.

Also, we have $∠ ETF = 2 ∠ EA'F = 2(\alpha+\beta)$ and

∠ EBF &= ∠ EBA + ∠ ABF = ∠ ECA + ∠ ADF \\
&= ∠ A'CA + ∠ ADA' = (\alpha+\beta) + (\alpha+\beta) = 2(\alpha+\beta)

which proves that $T$ also lies on $AB'$.

We then bring $M$ and $N$ into the picture as follows:

Point $T$ lies on both lines $ME$ and $NF$.

To show that $F$, $T$, $N$ are collinear,
note that $\triangle FEA' \sim \triangle FAD$ via a homothety at $F$.
This homothety maps $T$ to $N$.

We now deal with point $H$ using two claims.

We have $MH \parallel AD$ and $NH \parallel AC$.

Note that $MH \perp PN$,
but $PN$ is the perpendicular bisector of $AD$,
so in fact $MH \parallel AD$.
Similarly, $NH \parallel AC$.

Lines $MH$ and $NH$ bisect $\angle NMT$ and $\angle MNT$.
In fact, point $H$ is the incenter of $\triangle TMN$,
and $∠ NTH = ∠ HTM = 90\dg-(\alpha+\beta)$.

Hence, $∠ HMN = ∠ A'CD = ∠ ADC = \beta$.
But $∠ TMN = ∠ CME = 2 ∠ CAE = -2(90\dg-2\beta) = 2\beta$.
That proves $MH$ bisects $\angle NMT$; the other one is similar.

To show that $H$ is an incenter (rather than an excenter)
and get the last angle equality, we need to temporarily undirect our angles.
Assume WLOG that $\triangle ACD$ is directed counterclockwise.
The problem condition that $C$ and $D$ are the farther intersections of line $MN$
mean that $\angle NHM = \angle CAD > 90\dg$.
We are also promised $C$, $M$, $N$, $D$ are collinear in that order.
Hence the reflections of line $MN$ over lines $MH$ and $NH$, which meet at $T$,
should meet at a point for which $T$ lies on the same side as $H$.
In other words, $\triangle MTN$ is oriented counterclockwise and contains $H$.

Working with undirected $\alpha = \angle DCA$ and $\beta = \angle ADC$ with $\alpha + \beta < 90\dg$,
$ \angle NTH = \angle HTM = 1/2 \angle NTM = 1/2(180\dg-2(\alpha+\beta))
= 90\dg - (\alpha + \beta). $
This matches the claim and finishes the result.

Now
$ ∠ NFA = 90\dg - ∠ ADF = 90\dg-(\alpha+\beta) = ∠ NTH $
so $HT \parallel AP$.
And since $TE = TF$, we have the tangency requested too now, as desired.

There are many other ways to describe the point $T$.
For example, $AMTN$ is a parallelogram and $MBTN$ is an isosceles trapezoid.
In coordination, we joked that it was impossible to write a false conjecture.


A function $f \colon \NN \to \NN$ is said to be bonza if
$ f(a)\quad\text{divides}\quad b^a-f(b)^{f(a)} $
for all positive integers $a$ and $b$.

Determine the smallest real constant $c$ such that $f(n) \leq cn$
for all bonza functions $f$ and all positive integers $n$.

Solution:
The answer is $c=4$.

Let $P(a,b)$ denote the given statement $f(a) \mid b^a - f(b)^{f(a)}$.

We have $f(n) \mid n^n$ for all $n$.

Take $P(n,n)$.

Unless $f = \id$, we have $f(p) = 1$ for all odd primes $p$.

Consider any prime $q$ with $f(q) > 1$.
Then $f(q)$ is a power of $q$, and for each $n$ we get
$ P(q,n) \implies q \mid f(q) \mid n^q - f(n)^{f(q)}. $
Fermat's little theorem now gives
$n^q \equiv n \pmod q$ and $f(n)^{f(q)} \equiv f(n) \pmod q$
(since $f(q)$ is a power of $q$), and therefore $q \mid n - f(n)$.
Hence, unless $f$ is the identity function,
only finitely many $q$ could have $f(q) > 1$.

Now let $p$ be any odd prime,
and let $q$ be a large prime such that $q \not\equiv 1 \pmod p$
(possible for all $p > 2$, say by Dirichlet).
Then
$ P(p,q) \implies f(p) \mid q^p - 1^p. $
The RHS is $q^p - 1 \equiv q - 1 \not\equiv 0 \pmod p$, so $f(p) = 1$.

We have $f(n) \mid 2^\infty$ for all $n$.

If $p \mid f(n)$ is odd then $P(n,p)$ gives $p \mid f(n) \mid p^n-1^n$,
contradiction.

(In particular, we now know $f(n) = 1$ for all odd $n$, though we don't use this.)

We have $f(n) \le 2^{\nu_2(n)+2}$ for all $n$.

Consider $P(n,5) \implies f(n) \mid 5^n - 1^n$.
It's well-known that $\nu_2(5^n-1) = \nu_2(n)+2$ for all $n$.

This immediately shows $f(n) \le 4n$ for all $n$, hence $c=4$ in the problem statement works.

For the construction, the simplest one seems to be
$
f(n) =
1 & n \text{ odd} \\
16 & n = 4 \\
2 & n \text{ even}, n \neq 4

$
which is easily checked to work and has $f(4) = 16$.

With a little more case analysis we can classify all functions $f$.
The two trivial solutions are $f(n) = n$ and $f(n) = 1$;
the others are described by writing $f(n) = 2^{e(n)}$ for any function $e$ satisfying

$e(n) = 0$ for odd $n$;
$1 \le e(2) \le 2$;
$1 \le e(n) \le \nu_2(n)+2$ for even $n > 2$.

This basically means that there are almost no additional constraints
beyond what is suggested by the latter two claims.


An infinite sequence $a_1$, $a_2$, \dots\ consists of positive integers
has each of which has at least three proper divisors.
Suppose that for each $n\geq 1$,
$a_{n+1}$ is the sum of the three largest proper divisors of $a_n$.
Determine all possible values of $a_1$.

Solution:
The answer is $a_1 = 12^e \cdot 6 \cdot \ell$
for any $e, \ell \ge 0$ with $\gcd(\ell, 10) = 1$.

Let $\mathbf{S}$ denote the set of positive integers with at least three divisors.
For $x \in \mathbf{S}$, let $\psi(x)$ denote the sum of the three largest ones,
so that $\psi(a_n) = a_{n+1}$.

Proof that all such $a_1$ work.:
Let $x = 12^e \cdot 6 \cdot \ell \in \mathbf{S}$ with $\gcd(\ell, 10) = 1$.
As $\frac12+\frac13+\frac14 = \frac{13}{12}$, we get
$ \psi(x) =
x & e = 0 \\
\frac{13}{12} x & e > 0
$
so by induction on the value of $e$ we see that $\psi(x) \in \mathbf{S}$
(the base $e=0$ coming from $\psi$ fixing $x$).

Proof that all $a_1$ are of this form.:
In what follows $x$ is always an element of $\mathbf{S}$,
not necessarily an element of the sequence.

Let $x \in \mathbf{S}$. If $2 \mid \psi(x)$ then $2 \mid x$.

If $x$ is odd then every divisor of $x$ is odd,
so $f(x)$ is the sum of three odd numbers.

Let $x \in \mathbf{S}$. If $6 \mid \psi(x)$ then $6 \mid x$.

We consider only $x$ even because of the previous claim.
We prove the contrapositive that $3 \nmid x \implies 3 \nmid \psi(x)$.

If $4 \mid x$, then letting $d$ be the third largest proper divisor of $x$,
$ \psi(x) = \frac x2 + \frac x4 + d = \frac 34 x + d \equiv d \not\equiv 0 \pmod 3. $
Otherwise, let $p \mid x$ be the smallest prime dividing $x$, with $p > 3$.
If the third smallest nontrivial divisor of $x$ is $2p$, then
$ \psi(x) = \frac x2 + \frac xp + \frac{x}{2p} = \frac{3}{2p} x + \frac x2
\equiv \frac x2 \not\equiv 0 \pmod 3. $
If the third smallest nontrivial divisor of $x$ is instead an odd prime $q$, then
$ \psi(x) = \frac x2 + \frac xp + \frac{x}{q} \equiv 1+0+0 \equiv 1 \pmod 2. $

To tie these two claims into the problem, we assert:

Every $a_i$ must be divisible by $6$.

The idea is to combine the previous two claims
(which have no dependence on the sequence) with a size argument.

For odd $x \in \mathbf{S}$ note that $\psi(x) < ( \frac13+\frac15+\frac17 ) x < x$
and $\psi(x)$ is still odd.
So if any $a_i$ is odd the sequence is strictly decreasing and that's impossible.
Hence, we may assume $a_1$, $a_2$, \dots\ are all even.

If $x \in \mathbf{S}$ is even but $3 \nmid x$ then $\psi(x) < ( 1/2+\frac14+\frac15 ) x < x$
and $\psi(x)$ is still not a multiple of $3$.
So if any $a_i$ is not divisible by $3$ the sequence is again strictly decreasing.
\qedhere

On the other hand, if $x$ is a multiple of $6$, we have the following formula for $\psi(x)$:
$ \psi(x) =
\frac{13}{12}x & 4 \mid x \\
\frac{31}{30}x & 4 \nmid x \text{ but } 5 \mid x \\
x & 4 \nmid x \text{ and } 5 \nmid x.
$
Looking back on our sequence of $a_i$ (which are all multiples of $6$),
the center case cannot happen with our $a_i$, because $\frac{31}{30}x$
is odd when $x \equiv 2 \pmod 4$.
Hence in actuality
$ a_{n+1} = \frac{13}{12} a_n \quad\text{or}\quad a_{n+1} = a_n $
for every $n$.

Let $T$ be the smallest index such that $a_T = a_{T+1} = a_{T+2} = \dotsb$
(it must exist because we cannot multiply by $\frac{13}{12}$ forever).
Then we can exactly describe the sequence by
$ a_n = a_1 \cdot ( \frac{13}{12} )^{\min(n,T)-1}. $
Hence $a_1 = ( \frac{12}{13} )^{T-1} a_T$,
and since $a_T$ is a multiple of $6$ not divisible by $4$ or $5$,
it follows $a_1$ has the required form.


Alice and Bazza are playing the inekoalaty game,
a two‑player game whose rules depend on a positive real number $\lambda$ which is known to both players.
On the $n$th turn of the game (starting with $n=1$) the following happens:

If $n$ is odd, Alice chooses a nonnegative real number $x_n$ such that
$ x_1 + x_2 + \cdots + x_n \le \lambda n. $
If $n$ is even, Bazza chooses a nonnegative real number $x_n$ such that
$ x_1^2 + x_2^2 + \cdots + x_n^2 \le n. $

If a player cannot choose a suitable $x_n$, the game ends and the other player wins.
If the game goes on forever, neither player wins.
All chosen numbers are known to both players.

Determine all values of $\lambda$ for which Alice has a winning strategy
and all those for which Bazza has a winning strategy.

Solution:
The answer is that Alice has a winning strategy for $\lambda > 1/\sqrt2$,
and Bazza has a winning strategy for $\lambda < 1/\sqrt2$.
(Neither player can guarantee winning for $\lambda = 1/\sqrt2$.)

We divide the proof into two parts.

Alice's strategy when $\lambda \ge 1/\sqrt2$.:
Consider the strategy where Alice always plays $x_{2i+1} = 0$ for $i=0, \dots, k-1$.

In this situation, when $n = 2k+1$ we have

\sum_1^{2k} x_i &= 0 + x_2 + 0 + x_4 + \dots + 0 + x_{2k} \\
&\le k \cdot \sqrt{\frac{x_2^2 + \dots + x_{2k}^2}{k}}
= \sqrt{2} \cdot k < \lambda \cdot (2k+1)

and so the choices for $x_{2k+1}$ are
$ x_{2k+1} \in [0, \lambda \cdot (2k+1) - \sqrt{2} k] $
which is nonempty.
Hence Alice can't ever lose with this strategy.

But suppose further $\lambda > \frac{1}{\sqrt 2}$; we show Alice can win.
Choose $k$ large enough that
$ \sqrt{2} \cdot k < \lambda \cdot (2k+1) - \sqrt{2k+2}. $
Then on the $(2k+1)$st turn, Alice can (after playing $0$ on all earlier turns)
play a number greater than $\sqrt{2k+2}$ and cause Bob to lose.

Bob strategy when $\lambda \le 1/\sqrt2$.:
Consider the strategy where Bob always plays $x_{2i+2} = \sqrt{2 - x_{2i+1}^2}$
for all $i = 0, \dots, k-1$ (i.e.\ that is, the largest possible value Bob can play).

To analyze Bob's choices on each of his turns, we first need to estimate $x_{2k+1}$.
We do this by writing

\lambda \cdot (2k+1) &\ge x_1 + x_2 + \dots + x_{2k+1} \\
&= (x_1 + \sqrt{2-x_1^2}) + (x_3 + \sqrt{2-x_3^2}) \\
&\qquad+ \dots + (x_{2k-1} + \sqrt{2-x_{2k}^2}) + x_{2k+1} \\
&\ge {\underbrace{\sqrt{2} + \dots + \sqrt{2}}_{k \text{ times}}} + x_{2k+1}
= \sqrt 2 \cdot k + x_{2k+1}

where we have used the fact that $t + \sqrt{2-t^2} \ge 2$ for all $t \ge 0$.
This means that
$ x_{2k+1} \le \lambda \cdot (2k+1) - \sqrt 2 k < \sqrt 2. $
And $x_1^2 + x_2^2 + \dots + x_{2k}^2 + x_{2k+1}^2 = (2 + \dots + 2) + x_{2k+1}^2$,
Bob can indeed choose $x_{2k+2} = \sqrt{2-x_{2k+1}^2}$ and always has a move.

But suppose further $\lambda < 1/\sqrt2$.
Then the above calculation also shows that Alice couldn't
have made a valid choice for large enough $k$,
since $\lambda \cdot (2k+1) - \sqrt 2 k < 0$ for large $k$.

In the strategies above,
we saw that Alice prefers to always play $0$
and Bob prefers to always play as large as possible.
One could consider what happens in the opposite case:

If Alice tries to always play the largest number possible,
her strategy still wins for $\lambda > 1$.
If Bob tries to always play $0$,
Alice can win no matter the value for $\lambda > 0$.


Consider a $2025\times2025$ grid of unit squares.
Matilda wishes to place on the grid some rectangular tiles,
possibly of different sizes,
such that each side of every tile lies on a grid line
and every unit square is covered by at most one tile.

Determine the minimum number of tiles Matilda needs to place
so that each row and each column of the grid has exactly one unit square
that is not covered by any tile.

Solution:
The answer is $2112 = 2025 + 2 \cdot 45 - 3$.
In general, the answer turns out to be $\left\lceil n + 2 \sqrt n - 3 \right\rceil$,
but when $n$ is not a perfect square the solution is more complicated.

Construction.:
To be added.

Bound.:
To be added.

Ironically, the construction obtaining the answer
in the floor pattern at Sunshine Coast airport,
the closest airport to the site of the exam.
See \href{https://i0.wp.com/havewheelchairwilltravel.net/wp-content/uploads/2019/10/IMG_6815.jpg}{this image}
or \href{https://stea.com.au/wp-content/uploads/2020/12/sunshine-coast-airport-design-stea-architectural-projects-20.jpg}{this image}.