UniMath: From Proof-Synthesis Data to Test-Time Self-Evolution
2026-07-13
Great proofs are taught to evolve.
UniMath-35B-A3B is an open-source olympiad gold-medal mathematical model, obtained by further post-training Qwen3.6-35B-A3B on proof-evolution data. The goal is not to teach a model a new answer format, but to activate a reusable self-evolving capability: the ability to critique, repair, and synthesize its own mathematical reasoning.
Olympiad mathematics is not won by producing many answers; it is won by improving one line of reasoning until it becomes inevitable. A strong human contestant does not merely try again after a failed attempt. They inspect the proof state, locate the first real obstruction, preserve the useful structure, repair the local gap, and sometimes merge several incomplete routes into a final argument.
UniMath is built on the same principle. The central data insight is that mathematical self-evolution can be induced by supervision over proof change itself. Instead of training only on static problem-solution pairs, we construct fine-grained proof-synthesis trajectories that expose how a proof evolves: initial attempt, self-critique, obstruction diagnosis, targeted repair, alternative exploration, and final synthesis. This teaches the model not just what a correct proof looks like, but how an incorrect or incomplete proof becomes correct.
The second insight appears at test time. Once the model has learned this proof-editing loop from data, test-time scaling no longer has to be blind repeated sampling. UniMath uses additional computation to perform structured self-evolution: auditing proof obligations, tracking logical debt, carrying forward productive invariants, repairing local failures, and reconciling competing proof paths. In other words, the training data activates a reusable self-evolving capability, and test-time scaling gives that capability room to unfold.
This coupling between fine-grained proof-evolution data and test-time self-evolution is what enables UniMath to reach human gold-medal contestant level on both IMO 2026 and USAMO 2026 evaluations. More importantly, it suggests a broader recipe for mathematical intelligence: do not only teach models to solve problems; teach them to understand and improve their own reasoning process.
We look forward to seeing UniMath further demonstrate this capability on the IMO 2026 stage.
Four proof traces that teach self-evolution
The data-side insight behind UniMath is to supervise how a proof changes, not only what the final proof says. Each training trajectory exposes a reusable proof-editing loop: draft a route, locate its proof debt, repair the earliest obstruction, and synthesize the surviving ideas into a rigorous olympiad solution.
The first trace is not just an answer; it is a complete attempted route with its chosen objects, lemmas, case splits, and proof obligations made visible. This teaches the model to start from a coherent mathematical spine rather than a bag of disconnected tricks.
The second trace names the exact debt carried by the draft: unproved claims, hidden WLOG maps, missing cases, unchecked algebra, or a lemma used outside its range. The important supervision signal is not a score alone, but where the proof first stops being justified.
The third trace shows how to update the proof state after an audit. Some failures require a local patch; others require carrying only a useful invariant into a new route. This is where the model learns that evolution means preserving earned mathematics while changing the part that broke.
The last trace compresses drafts, critiques, repaired lemmas, and abandoned routes into one readable proof. It teaches the model to merge competing paths without carrying dead branches forward, turning test-time compute into a polished final argument rather than a longer transcript.
Test-time scaling as self-evolution
At inference time, UniMath does not simply sample many independent guesses and hope one is right. It runs the same proof-editing loop it learned from data, now spending its test-time compute on improving a proof it already has. The insight is that olympiad proofs rarely fail everywhere — they fail at one identifiable obstruction, while most of the surrounding mathematics is sound. Blind resampling throws that earned progress away; self-evolution keeps it and repairs only the part that broke. The results that follow report exactly this loop in action.
We draw a broad set of independent proof attempts and have the model self-assess each one, turning raw diversity into a ranked pool of proof-states — so all later compute lands on the routes already closest to a full solution.
The strongest non-perfect candidates enter short refinement chains, each round guided by the previous round's own critique and kept only when it measurably improves. This is the learned loop of preserving what works, fixing what broke, run at test time.
Surviving proofs are pairwise-merged so a clean lemma from one can rescue a stronger route from another; a merge that regresses is discarded. Rankings are re-checked by majority vote first, so noisy self-scores never crown a flawed proof.
Results
We report UniMath-35B-A3B as direct proof attempts per problem (w/o TTS, avg@8) and compare it with the same model under +TTS, where the model follows the proof-synthesis loop learned from data: draft, assess, refine, and synthesize. Scores use the strict {0, 1, 6, 7} proof rubric; each olympiad is out of 42 points.
Case studies
Full model proofs for the IMO 2025 and USAMO 2026 problems. Each case is collapsed by default. We show the best TTS proof-state selected during test-time evolution, with the header score reporting the final TTS score.
IMO 2025 P1
Problem
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.
Summary
a. Verdict: I have successfully solved the problem. For every integer \(n\ge 3\) the possible values of \(k\) are exactly \(0\), \(1\) and \(3\).
b. Method Sketch:
Let \(P_n=\{(a,b)\in\mathbb Z^2 : a,b\ge 1,\;a+b\le n+1\}\). A line is sunny iff its slope is different from \(0\), \(\infty\) and \(-1\).
Assume we have \(n\) distinct lines covering \(P_n\) with exactly \(k\) sunny lines.
- Structure of the non‑sunny lines. Let \(v,h,d\) be the numbers of vertical, horizontal and diagonal (slope \(-1\)) lines among them. Double counting points in columns, rows and diagonals forces the non‑sunny lines to be exactly the first \(v\) columns \(x=1,\dots,v\), the first \(h\) rows \(y=1,\dots,h\) and the last \(d\) diagonals \(x+y=n-d+2,\dots,n+1\).
- Reduction to \(P_k\). The points not covered by any non‑sunny line form a translate of \(P_k\); after translation the \(k\) sunny lines must cover the original triangle \(P_k\). Hence a necessary condition is the existence of \(k\) distinct sunny lines covering \(P_k\) (property \(S(k)\)).
- Upper bound. Every sunny line contains at most \(\lfloor (k+1)/2\rfloor\) points of \(P_k\).
- Even \(k\ge 4\). Total points \(= \frac{k(k+1)}2\); with the bound the \(k\) lines cover at most \(k\cdot\lfloor\frac{k+1}2\rfloor\) points, which is strictly smaller. So \(S(k)\) false.
- Odd \(k\ge 5\). Total points equal \(k\cdot\frac{k+1}2\). To cover \(P_k\) every line must attain the maximum \(\frac{k+1}2\). A precise analysis shows that exactly three sunny lines can achieve this maximum (slopes \(1,-\frac12,-2\)). Because \(k\ge 5>3\) we cannot pick \(k\) distinct lines of that size – impossible.
- Constructions for \(k=0,1,3\). Explicit families of \(n\) lines are given for each \(n\ge 3\), using only horizontal/vertical lines and the three sunny lines from the \(k=3\) case. Thus the attainable \(k\) are exactly \(0,1,3\).
Detailed Solution
1. Notation.
For an integer \(n\ge 1\) set
A line is sunny iff it is not parallel to the \(x\)-axis, the \(y\)-axis or the line \(x+y=0\).
We are given \(n\ge 3\) and look for nonnegative integers \(k\) for which there exist \(n\) distinct lines covering \(P_n\) with exactly \(k\) sunny lines.
2. Structure of a covering – reduction to a smaller triangle.
Assume that \(L_1,\dots ,L_n\) are distinct lines covering \(P_n\) and that exactly \(k\) of them are sunny.
Split the non‑sunny lines into three families:
Clearly \(k=n-v-h-d\).
Columns. For \(a\in\{1,\dots ,n\}\) put \(C_a=\{(a,b)\in P_n : 1\le b\le n+1-a\}\); \(|C_a|=n+1-a\).
If the vertical line \(x=a\) is not in \(V\), every point of \(C_a\) must be covered by a line \(\notin V\). There are \(n-v\) such non‑vertical lines, each meeting \(C_a\) in at most one point. Hence
Inequality (1) holds for every \(a\) with \(x=a\notin V\).
If \(1\le a\le v\) then \(a\) cannot satisfy (1), so \(x=a\in V\). Thus \(\{1,\dots ,v\}\subseteq V\). Because \(|V|=v\) we obtain exactly
Rows. Symmetrically, for \(b\in\{1,\dots ,n\}\) the row \(R_b=\{(a,b)\in P_n : 1\le a\le n+1-b\}\) gives
Diagonals. For \(s\in\{2,\dots ,n+1\}\) put \(D_s=\{(a,b)\in P_n : a+b=s\}\); \(|D_s|=s-1\).
If \(x+y=s\notin D\) then
Thus every \(s>n-d+1\) must belong to \(D\). Since \(|D|=d\) and the largest sum is \(n+1\),
The uncovered set. A point \((a,b)\in P_n\) lies on a non‑sunny line exactly when \(a\le v\), or \(b\le h\), or \(a+b\ge n-d+2\). Hence the points not covered by any non‑sunny line are
Translate the plane by \((-v,-h)\): set \(a'=a-v,\;b'=b-h\). Then \(a',b'\ge 1\) and
Thus the translated set \(U'\) is exactly \(P_k\). The \(k\) sunny lines, after the same translation, become \(k\) distinct sunny lines covering \(P_k\).
Consequently, a necessary condition for the original configuration is the existence of \(k\) distinct sunny lines that cover \(P_k\); we denote this property by \(S(k)\).
3. Determining which \(k\) satisfy \(S(k)\).
3.1 Small values.
- \(k=0\): \(P_0=\varnothing\); vacuously true.
- \(k=1\): \(P_1=\{(1,1)\}\); any sunny line through \((1,1)\) works.
- \(k=2\): \(P_2=\{(1,1),(1,2),(2,1)\}\). Any two of these points determine a line of slope \(0,\infty\) or \(-1\); a sunny line contains at most one of them. Two sunny lines cover at most two points – impossible.
- \(k=3\): \(P_3\) has six points. The three lines
are sunny, distinct, and one checks directly that they cover all six points of \(P_3\). Hence \(S(3)\) is true.
3.2 An upper bound for a sunny line in \(P_m\).
Lemma 1. For every integer \(m\ge 1\) and every sunny line \(L\),
Proof. We may assume that \(L\) passes through at least two lattice points; otherwise,
Write \(L\) in parametric form
with \(\gcd(p,q)=1\), \(q>0\). Because \(L\) is sunny we have \(p\neq0\) and \(p\neq -q\).
The points of \(L\) in \(P_m\) correspond to an interval of integers \(t\in[t_0,t_1]\); let \(T=t_1-t_0+1\). Translating the line we may assume \(t_0=0\), so the points are at \(t=0,1,\dots ,T-1\).
For each \(t\)
The sum \(S(t)=x_0+y_0+(p+q)t\) is strictly monotone and satisfies \(2\le S(t)\le m+1\). Hence
so \(T-1\le (m-1)/|p+q|\) and \(T\le \bigl\lfloor (m-1)/|p+q|\bigr\rfloor +1\).
If \(|p+q|\ge 2\) then \(T\le \lfloor (m-1)/2\rfloor +1 = \lfloor (m+1)/2\rfloor\).
Now suppose \(|p+q|=1\). We treat the two possibilities.
Subcase 1: \(p+q=1\). Then \(p=1-q\); \(p\neq0\) forces \(q\neq1\) and \(p\neq-q\) is automatic, so \(q\ge 2,\;p\le -1\).
From (6) with \(t=0\) and \(t=T-1\):
Because \(x_0\ge 1\) we get \(y_0\le m+1-T\). Combining with the lower bound on \(y_0\):
Since \(q\ge 2\), \(q-1\ge 1\), the left side is at least \((T-1)+T=2T-1\). Thus \(2T-1\le m\), i.e. \(T\le (m+1)/2\); as an integer \(T\le\lfloor (m+1)/2\rfloor\).
Subcase 2: \(p+q=-1\). Then \(p=-1-q\); \(q\ge1,\;p\le-2\). Now \(S(t)\) decreases. From (6):
From \(x_0\ge1\) we obtain \(y_0\le m\). Hence
Because \(q\ge1\), \(q+1\ge2\), so \(2(T-1)\le m-1\Rightarrow T\le (m+1)/2\). Again \(T\le\lfloor (m+1)/2\rfloor\). ∎
3.3 Even \(k\). Let \(k=2m\) with \(m\ge 2\) (so \(k\ge4\)). The number of points of \(P_k\) is \(\frac{k(k+1)}2=m(2m+1)\).
By Lemma 1 every sunny line contains at most \(m\) points. Hence the \(k\) lines together cover at most \(k\cdot m=2m^2\) points. Because \(2m^2<m(2m+1)\) for all \(m\ge1\), they cannot cover \(P_k\). For \(k=2\) (i.e. \(m=1\)) we already saw \(S(2)\) is false. Thus \(S(k)\) is false for every even \(k\ge2\).
3.4 Odd \(k\ge5\). Let \(k=2m+1\) with \(m\ge2\) (so \(k\ge5\)). Total points of \(P_k\) is \((2m+1)(m+1)\). Set \(M=m+1=(k+1)/2\). Lemma 1 gives \(|L\cap P_k|\le M\) for every sunny line \(L\).
If \(k\) sunny lines cover \(P_k\), the sum of their sizes is at least \(kM\). Since each size \(\le M\), we must have equality for every line and the lines must be pairwise disjoint; in particular each line contains exactly \(M\) points.
Lemma 2. Let \(m\ge1\) and \(n=2m+1\). If a sunny line \(L\) satisfies \(|L\cap P_n|=m+1\), then \(L\) is one of the following three lines:
Proof. Use the same parametrisation as in Lemma 1 and let the points be at \(t=0,\dots ,m\) (so \(T=m+1\)). The sum bound gives \(|p+q|m\le n-1=2m\), hence \(|p+q|\le2\).
Case A: \(|p+q|=2\).
- A1: \(p+q=2\). Then \(S(0)=x_0+y_0\ge2\), \(S(m)=x_0+y_0+2m\le 2m+2\). Because \(S(m)-S(0)=2m\) we must have \(S(0)=2,\;S(m)=2m+2\). Thus \(x_0+y_0=2\) and therefore \(x_0=y_0=1\). The points are \((1+qt,\,1+pt)\). For \(t=1\) we need \(1+p\ge1\Rightarrow p\ge0\); with \(p\neq0\) we get \(p>0\). Together with \(q>0,\;p+q=2,\;\gcd(p,q)=1\) forces \(p=1,\;q=1\). Hence \(L\) is \(y=x\).
- A2: \(p+q=-2\). Then \(S(0)=2m+2,\;S(m)=2\) so \(x_0+y_0=2m+2\). Here \(p=-2-q\le-3\). At \(t=m\): \(y_0+pm\ge1\Rightarrow y_0\ge1-pm=1+(q+2)m\). From \(x_0+y_0=2m+2\) and \(x_0\ge1\) we get \(y_0\le2m+1\). Thus \(1+(q+2)m\le2m+1\Rightarrow (q+2)m\le2m\Rightarrow q\le0\), impossible.
Case B: \(|p+q|=1\).
- B1: \(p+q=1\). Then \(p=1-q,\;q\ge2,\;p\le-1\). Conditions at \(t=0\) and \(t=m\):
From \(x_0\ge1\) we obtain \(y_0\le m+1\). Hence \(1+(q-1)m\le m+1\Rightarrow (q-1)m\le m\Rightarrow q\le2\). Thus \(q=2\). Then \(y_0\ge1+m\) and \(y_0\le m+1\) force \(y_0=m+1\), and \(x_0=(m+2)-y_0=1\). The line passes through \((1,m+1)\) with direction \((2,-1)\); its equation is \(y=-\frac12 x+\frac{2m+3}{2}\).
- B2: \(p+q=-1\). Then \(p=-1-q,\;q\ge1,\;p\le-2\). Now
From \(x_0\ge1\) we get \(y_0\le2m+1\). Hence \(1+(q+1)m\le2m+1\Rightarrow (q+1)m\le2m\Rightarrow q\le1\). Thus \(q=1\). Then \(y_0\ge1+2m=2m+1\) and \(y_0\le2m+1\) give \(y_0=2m+1\), and \(x_0=(2m+2)-y_0=1\). The line passes through \((1,2m+1)\) with direction \((1,-2)\); its equation is \(y=-2x+2m+3\).
This proves Lemma 2. ∎
For \(m\ge2\) (i.e. \(k\ge5\)) the three lines in Lemma 2 are distinct. Consequently there are at most three sunny lines in \(P_k\) that attain the maximal size \(M\). But we need \(k\ge5\) distinct lines of size \(M\) – impossible. Hence \(S(k)\) is false for every odd \(k\ge5\).
Combining the cases, \(S(k)\) holds only for \(k\in\{0,1,3\}\).
4. Constructions for the original problem (\(n\ge3\)).
Now we show that for every \(n\ge3\) and each \(k\in\{0,1,3\}\) one can actually exhibit \(n\) distinct lines satisfying the conditions.
4.1 \(k=0\). Take the \(n\) horizontal lines \(y=1,2,\dots ,n\). They are all non‑sunny, distinct, and cover \(P_n\) because every point of \(P_n\) has its \(y\)‑coordinate between \(1\) and \(n\).
4.2 \(k=1\). Take the \(n-1\) horizontal lines \(y=1,2,\dots ,n-1\). The only point of \(P_n\) not on any of them is \((1,n)\) (since \(a+b\le n+1\) forces \(a=1\) when \(b=n\)). The sunny line \(L:\;y=x+n-1\) passes through \((1,n)\) and has slope \(1\). It is distinct from the horizontal lines. Together they give \(n\) lines covering \(P_n\), exactly one of which is sunny.
4.3 \(k=3\). Take the \(n-3\) vertical lines \(x=1,2,\dots ,n-3\) (if \(n=3\) there are none). These cover all points with \(a\le n-3\). The remaining points satisfy \(a\ge n-2,\; b\ge1,\; a+b\le n+1\). Shifting the \(x\)‑coordinate by \(-(n-3)\) turns this set into a copy of \(P_3\). The three sunny lines from the \(S(3)\) construction, translated by \((n-3,0)\), are
These three lines are sunny (slopes \(1,-2,-\tfrac12\)), distinct, and they cover the translated \(P_3\), hence the remaining points of \(P_n\). Together with the \(n-3\) vertical lines we obtain \(n\) lines, exactly three of which are sunny.
All lines in the three constructions are distinct and satisfy the required covering property.
5. Conclusion.
For every integer \(n\ge 3\), the nonnegative integers \(k\) for which the required configuration exists are exactly \(k=0\), \(k=1\) and \(k=3\).
IMO 2025 P2
Problem
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 circumcentre of triangle \(ACD\). Line \(AP\) meets \(\Omega\) again at \(E\neq A\) and meets \(\Gamma\) again at \(F\neq A\). Let \(H\) be the orthocentre of triangle \(PMN\).
Prove that the line through \(H\) parallel to \(AP\) is tangent to the circumcircle of triangle \(BEF\).
1. Summary
a. Verdict: I have successfully solved the problem. The final answer is a complete rigorous proof that the line through \(H\) parallel to \(AP\) is tangent to the circumcircle of triangle \(BEF\).
b. Method Sketch:
Apply a similarity transformation to place the figure in a convenient Cartesian coordinate system: \(A=(0,0)\), \(B=(0,2)\), and the line of centres \(MN\) as \(y=1\) with \(M=(u,1)\), \(N=(v,1)\) and \(u<v\).
Determine the coordinates of \(C\) and \(D\) on \(MN\) and express \(u,v\) in terms of their \(x\)-coordinates \(c,d\).
Find the circumcentre \(P\) of \(\triangle ACD\): \(P=\bigl(\frac{c+d}{2},\frac{1-cd}{2}\bigr)\). Introduce symmetric parameters \(p=c+d\), \(q=cd\;( < 0)\).
Parametrise the line \(AP\) as \(tP\); compute the parameters \(t_E,t_F\) for the second intersections \(E\in\Omega\), \(F\in\Gamma\).
Write the circumcircle of \(\triangle BEF\) as \(X^2+Y^2+DX+EY+F_0=0\). Using \(B(0,2)\) and the fact that \(E,F\) lie on it (via the line \(AP\)) gives \(D,E,F_0\) in terms of \(p,q\).
Compute the orthocentre \(H\) of \(\triangle PMN\): \(H=\bigl(\frac{p}{2},\frac{3q+1}{2q}\bigr)\).
The required line \(L\) through \(H\) parallel to \(AP\) has direction \(P\). Find the centre \(Q\) and radius \(R\) of the circumcircle of \(BEF\).
Show that the perpendicular distance from \(Q\) to \(L\) equals \(R\) by evaluating \(\lvert(Q-H)\times P\rvert/\lvert P\rvert\) and simplifying to \(R^2\).
The few degenerate cases (\(p=0\), \(q=-1\)) correspond to \(\triangle BEF\) or \(\triangle PMN\) being degenerate, which are excluded by the problem’s hypotheses.
2. Detailed Solution
1. Coordinate set‑up.
Because the problem is invariant under similarity transformations (rotations, translations, scaling), we may place the figure in a convenient Cartesian coordinate system. Let the common chord \(AB\) be on the \(y\)-axis. The line of centres \(MN\) is perpendicular to \(AB\) and passes through the midpoint of \(AB\). Rotate the plane so that \(MN\) is horizontal; then translate so that the midpoint of \(AB\) becomes \((0,1)\) and scale so that \(AB = 2\). We obtain
and the line \(MN\) is the horizontal line \(y = 1\).
Write the centres as
The order of the points on \(MN\) is given as \(C, M, N, D\); therefore on the line \(y = 1\) the \(x\)-coordinates satisfy \(x_C < u < v < x_D\). In particular \(u < v\).
The radii are
and the hypothesis \(r < R\) is equivalent to \(|u| < |v|\); together with \(u < v\) this gives \(v > |u|\).
The equations of the circles simplify to
2. The points \(C\) and \(D\).
The line \(MN\) (\(y = 1\)) meets \(\Omega\) at the solutions of
Its roots are \(u \pm r\). Since \(C\) lies to the left of \(M\), its \(x\)-coordinate is
Analogously, for \(\Gamma\) the equation is \(x^2 - 2v x - 1 = 0\); the point \(D\) lies to the right of \(N\), so
From the quadratic, the product of the two roots is \(-1\); hence the other root of the first quadratic is \(-1/c\). The centre \(u\) is the midpoint of the two intersections, therefore
Similarly,
3. Circumcentre \(P\) of \(\triangle ACD\).
We have \(A(0,0)\), \(C(c,1)\), \(D(d,1)\). The perpendicular bisector of \(CD\) is the vertical line through the midpoint, so
The perpendicular bisector of \(AC\): the midpoint is \(\bigl(\frac{c}{2},\frac12\bigr)\), the slope of \(AC\) is \(\frac1c\) (note \(c \neq 0\); otherwise \(C\) would be the midpoint of \(AB\), which is impossible because \(r = \sqrt{u^2+1} > |u|\)), so the perpendicular slope is \(-c\). Its equation is \(y - \frac12 = -c\bigl(x - \frac{c}{2}\bigr)\). Substituting \(x = \frac{c+d}{2}\) yields
Introduce the symmetric quantities
Then
A useful factorisation is \(|P|^2 = \frac{(c^2+1)(d^2+1)}{4}\).
4. Points \(E\) and \(F\) on the circles.
The line \(AP\) passes through the origin, hence it can be written parametrically as \(tP\) (\(t \in \mathbb{R}\)).
For a circle through \(A\) of the form \(x^2+y^2-2y-2hx=0\) (see (1)), substituting \((t x_P, t y_P)\) gives
The root \(t=0\) corresponds to \(A\); the other intersection is therefore at
Apply this to \(\Omega\) (\(h = u\)) and \(\Gamma\) (\(h = v\)). First compute \(y_P + u x_P\):
The numerator simplifies to \((c-d)(c^2+1)\); hence
Similarly,
Using \(|P|^2 = \frac{(c^2+1)(d^2+1)}{4}\), we obtain the parameters for \(E\) and \(F\):
Consequently,
5. Circumcircle of \(\triangle BEF\).
Let its equation be
Since \(B(0,2)\) lies on it,
The line \(AP\) is \(tP\). Substituting \((t x_P, t y_P)\) into (6) yields
The two intersection points with this line are exactly \(E\) and \(F\); therefore \(t_E, t_F\) are the roots of this quadratic. Hence
First compute the product:
Multiplying by \(|P|^2 = \frac{(c^2+1)(d^2+1)}{4}\) gives
Define
so \(F_0 = -S\). From (7) we obtain
Now the sum of the roots. We have
The numerator simplifies:
Thus
Now from (8),
Recall \(x_P = \frac{p}{2}\), \(y_P = \frac{1-q}{2}\) with \(p = c+d\), \(q = cd\). Multiplying the equality by 2:
Notice that \(1-q = 1-cd = -(cd-1)\). Hence (11) becomes
Because \(q = cd < 0\), we have \(cd \neq 1\); divide by \(cd-1\):
Now express everything with \(p,q\). Since
equation (10) gives
Then
Substituting this into (12) yields
If \(p = 0\), then \(c+d = 0\); consequently \(P\) lies on the \(y\)-axis, the line \(AP\) coincides with \(AB\), and meets both circles again at \(B\). Thus \(E = F = B\), making \(\triangle BEF\) degenerate – contradicting the existence of its circumcircle. Hence \(p \neq 0\), and we can solve for \(D\):
6. Orthocentre \(H\) of \(\triangle PMN\).
The vertices are \(P\bigl(\frac{p}{2},\frac{1-q}{2}\bigr)\), \(M(u,1)\), \(N(v,1)\).
The side \(MN\) is horizontal, so the altitude from \(P\) is the vertical line \(x = \frac{p}{2}\). Consequently
To find \(y_H\) we use the altitude from \(M\). The slope of \(PN\) is
We have \(1 - y_P = 1 - \frac{1-q}{2} = \frac{1+q}{2}\). Also
Thus the slope of \(PN\) is \(-d\) (the case \(q = -1\) would give \(1+q = 0\), so \(P\) lies on \(MN\) and \(\triangle PMN\) is degenerate – this is excluded because \(H\) is defined).
The altitude from \(M\) is perpendicular to \(PN\), so its slope is \(1/d\). Its equation is
Setting \(X = \frac{p}{2}\) gives
Now \(\frac{p}{2} - u = \frac{c+d}{2} - \frac{c^2-1}{2c} = \frac{c(c+d) - (c^2-1)}{2c} = \frac{cd+1}{2c} = \frac{1+q}{2c}\).
Therefore
Thus
7. The line through \(H\) parallel to \(AP\).
The direction of \(AP\) is the vector \(P = \bigl(\frac{p}{2}, \frac{1-q}{2}\bigr)\). The required line \(L\) passes through \(H\) with this direction; it can be written as \(H + t P\) (\(t \in \mathbb{R}\)).
8. Centre and radius of the circumcircle of \(BEF\).
The centre \(Q\) of the circle (6) is \(Q = \bigl(-\frac{D}{2}, -\frac{E}{2}\bigr)\). Using (13),
The radius \(R\) satisfies \(R^2 = |Q|^2 - F_0\). Compute
Hence
Expand \((8q-p^2)^2 = 64q^2 - 16p^2q + p^4\). The numerator becomes
Since \(q^2 - 2q + 1 = (q-1)^2\),
9. Distance from \(Q\) to line \(L\).
A vector from \(H\) to \(Q\) is
The line \(L\) has direction \(P = \bigl(\frac{p}{2}, \frac{1-q}{2}\bigr)\). The (signed) area of the parallelogram spanned by \(Q-H\) and \(P\) is the two‑dimensional cross product
Simplify:
The length of \(P\) is
The perpendicular distance from \(Q\) to \(L\) is
Therefore
This is exactly the value found for \(R^2\) in (16). Hence \(d(Q,L) = R\).
10. Conclusion.
The distance from the centre of the circumcircle of \(\triangle BEF\) to the line through \(H\) parallel to \(AP\) equals the radius of that circle. Therefore the line is tangent to the circumcircle of \(\triangle BEF\).
11. Remarks on degenerate cases.
The algebraic steps require \(p \neq 0\) and \(q \neq -1\).
If \(p = 0\), then \(c+d = 0\); consequently \(P\) lies on the \(y\)-axis, the line \(AP\) coincides with \(AB\), and meets both circles again at \(B\). Thus \(E = F = B\), making \(\triangle BEF\) degenerate – contradicting the existence of its circumcircle.
If \(q = -1\), then \(cd = -1\) and \(y_P = \frac{1-(-1)}{2} = 1\); so \(P\) lies on \(MN\), \(\triangle PMN\) becomes degenerate and its orthocentre is undefined.
The problem’s hypotheses therefore imply \(p \neq 0\) and \(q \neq -1\), and the proof is complete. \(\square\)
IMO 2025 P3
Problem
Let \(\mathbb{N}\) denote the set of positive integers. A function \(f\colon\mathbb{N}\to\mathbb{N}\) is said to be bonza if
for all positive integers \(a\) and \(b\).
Determine the smallest real constant \(c\) such that \(f(n)\leqslant cn\) for all bonza functions \(f\) and all positive integers \(n\).
1. Summary
a. Verdict: I have found a complete solution. The smallest real constant \(c\) is \(4\).
b. Method Sketch:
First, basic properties are derived: \(f(1)=1\), \(f(a)\mid a^{a}\), \(f(2)\in\{1,2,4\}\), and for a prime \(p\), \(f(p)=p^{k_{p}}\) (\(k_{p}\ge 0\)).
Lower bound \(c\ge 4\). A specific bonza function is constructed with \(f(4)=16\), forcing \(c\ge 4\).
Upper bound \(f(n)\le 4n\). The proof splits according to \(f(2)\).
- If \(f(2)=1\) or \(4\), one shows \(f(p)=1\) for all odd primes \(p\) and that every \(f(n)\) is a power of \(2\). Then for odd \(n\), \(f(n)=1\); for even \(n\), using \(b=2\) (or \(b=3\)) together with the Lifting‑The‑Exponent lemma gives \(f(n)\le 4\cdot2^{v_{2}(n)}\le 4n\).
- If \(f(2)=2\), first prove that for every odd prime \(p\), \(f(p)\in\{1,p,p^{2}\}\) (Lemma 3.1). Then, using minimal counterexamples and Bertrand’s postulate, eliminate \(p^{2}\) for \(p\ge 5\), so \(f(p)\in\{1,p\}\) (Lemma 3.3). Show \(f(3)\in\{1,3\}\) (Lemma 3.2). Subcase \(f(3)=1\): then \(f(p)=1\) for all odd primes, \(f(n)\) are powers of \(2\), and LTE with \(b=3\) yields \(f(n)\le 4n\) for even \(n\). Subcase \(f(3)=3\): one proves \(f(p)=p\) for every odd prime \(p\) (again via Bertrand). For any \(n\), taking \(a=p\), \(b=n\) for all primes \(p\) gives \(p\mid n-f(n)\), hence \(f(n)=n\le 4n\).
In all cases \(f(n)\le 4n\), so \(c=4\) works. Together with the lower bound, \(c=4\) is optimal.
2. Detailed Solution
Let \(\mathbb N\) be the set of positive integers. For all \(a,b\in\mathbb N\)
1. Basic properties
- \(a=b=1\): \(f(1)\mid 1^{1}-f(1)^{f(1)}=1-f(1)^{f(1)}\). Since \(f(1)\mid f(1)^{f(1)}\), we get \(f(1)\mid 1\); hence \(f(1)=1\).
- \(a=b\): \(f(a)\mid a^{a}-f(a)^{f(a)}\). Because \(f(a)\mid f(a)^{f(a)}\), adding gives
- From (2) with \(a=2\): \(f(2)\mid 4\), so \(f(2)\in\{1,2,4\}\).
- If \(p\) is prime, (2) gives \(f(p)\mid p^{p}\). All prime factors of \(f(p)\) must be \(p\); therefore
For an integer \(m\ge 1\) denote by \(v_{2}(m)\) the exponent of \(2\) in the prime factorisation of \(m\).
2. Lower bound – why \(c\ge 4\)
Define a function \(f:\mathbb N\to\mathbb N\) by
\(f(1)=1\);
for odd \(n>1\): \(f(n)=1\);
for even \(n\), write \(n=2^{k}m\) with \(m\) odd, \(k\ge 1\).
- If \(m=1\) (pure power of \(2\)): \(f(2)=4\); for \(k\ge 2\), \(f(2^{k})=2^{k+2}=4\cdot2^{k}\).
- If \(m>1\): \(f(n)=2\).
All values are powers of \(2\). For \(x\in\mathbb N\) let \(v(x)=v_{2}(f(x))\); then \(f(x)=2^{v(x)}\). Observe:
- \(a\) odd \(\Rightarrow v(a)=0\).
- \(a=2\): \(v(a)=2\).
- \(a=2^{k}\;(k\ge 2)\): \(v(a)=k+2\).
- \(a\) even with odd part \(>1\): \(v(a)=1\).
We verify (1). When \(v(a)=0\) (i.e. \(f(a)=1\)) it is trivial. Assume \(v(a)\ge 1\) and put \(v=v(a)\).
Since \(f(b)\) is a power of \(2\), write \(f(b)=2^{w}\) with \(w=v(b)\) (\(w=0\) if \(b\) is odd). Then
Case 1 – \(b\) odd. Then \(w=0\); the right‑hand side is \(b^{a}-1\).
- If \(b=1\), then \(b^{a}-1=0\), which is divisible by any \(2^{v}\).
- If \(b>1\) is odd, then \(a\) is even, as noted earlier. By the Lifting‑The‑Exponent lemma (LTE) for \(p=2\),
Because \(b\) is odd, one of \(b-1,b+1\) is exactly divisible by \(2\) (valuation \(1\)) and the other by at least \(4\) (valuation \(\ge 2\)). Hence \(v_{2}(b-1)+v_{2}(b+1)\ge 3\), and
Now check \(2+v_{2}(a)\ge v\):
* \(a=2\): \(v_{2}(a)=1,\;v=2,\;2+1=3\ge 2\).
* \(a=2^{k}\;(k\ge 2)\): \(v_{2}(a)=k,\;v=k+2,\;2+k=v\).
* \(a\) even with odd part \(>1\): \(v_{2}(a)\ge 1,\;v=1,\;2+v_{2}(a)\ge 3\ge 1\).
In every case \(v_{2}(b^{a}-1)\ge v\); hence \(2^{v}\mid b^{a}-1\).
Case 2 – \(b\) even. Write \(b=2^{t}u\) with \(u\) odd, \(t\ge 1\). Then
Both terms are positive integers. By the non‑archimedean property of the \(2\)-adic valuation,
Thus it suffices to prove \(\min(at,\,w\cdot2^{v})\ge v\).
Examine the three types of even \(a\):
- \(a\) has odd part \(>1\): \(v=1\), and \(a\ge 6\).
- \(a=2\): \(v=2\), \(a=2\).
- \(a=2^{k}\;(k\ge 2)\): \(v=k+2\), \(a=2^{k}\). One checks \(2^{k}\ge k+2\) for \(k\ge 2\).
In all cases \(a\ge v\). Since \(t\ge 1\), we have \(at\ge a\ge v\).
Because \(b\) is even, \(f(b)\ge 2\), so \(w\ge 1\). Hence \(w\cdot2^{v}\ge 2^{v}\). For every integer \(v\ge 1\) one has \(2^{v}\ge v\) (easy induction). Therefore \(w\cdot2^{v}\ge v\).
Consequently \(\min(at,\,w\cdot2^{v})\ge v\), and the required divisibility holds.
The construction satisfies (1) for all \(a,b\); hence \(f\) is bonza.
For this \(f\) we have \(f(4)=f(2^{2})=2^{2+2}=16=4\cdot4\). If a real number \(c\) satisfies \(f(n)\le cn\) for every bonza function and every \(n\), then in particular \(16\le c\cdot4\), i.e. \(c\ge 4\).
3. Upper bound – proving \(f(n)\le 4n\) for every bonza function
Now fix an arbitrary bonza function \(f\). We already know \(f(1)=1\), \(f(2)\in\{1,2,4\}\) and (3). We treat the three possibilities for \(f(2)\).
3.1 Case \(f(2)=1\)
Odd primes. For an odd prime \(p\), take \(a=p,\;b=2\):
Write \(f(p)=p^{k_{p}}\). If \(k_{p}\ge 1\) then \(p\mid f(p)\), so \(p\mid 2^{p}-1\). Fermat’s little theorem gives \(2^{p}\equiv 2\pmod p\), hence \(2^{p}-1\equiv 1\pmod p\) – contradiction. Thus \(k_{p}=0\), i.e. \(f(p)=1\) for every odd prime \(p\).
Structure of \(f(n)\). Suppose some \(f(n)\) possessed an odd prime divisor \(q\). Then \(f(q)=1\). Taking \(a=n,\;b=q\) in (1):
Since \(q\mid f(n)\), we obtain \(q\mid q^{n}-1\), which forces \(q\mid 1\) – impossible. Therefore no \(f(n)\) contains an odd prime factor; every \(f(n)\) is a power of \(2\).
Value of \(f(n)\). For any \(n\), \(a=n,\;b=n\) gives
because \(f(n)\mid f(n)^{f(n)}\).
If \(n\) is odd, \(n^{n}\) is odd, so \(f(n)\) is an odd power of \(2\); hence \(f(n)=1\).
If \(n\) is even, take \(a=n,\;b=2\) (here \(f(2)=1\)):
The number \(2^{n}-1\) is odd, so again \(f(n)\) is odd and \(f(n)=1\).
Consequently \(f(n)=1\le 4n\) for all \(n\).
3.2 Case \(f(2)=4\)
Odd primes. For an odd prime \(p\), \(a=p,\;b=2\):
Write \(f(p)=p^{k_{p}}\). Modulo \(p\), \(2^{p}\equiv 2\). For the second term,
because \(p\nmid 2\) and, reducing the exponent modulo \(p-1\), we have \(p\equiv 1\pmod{p-1}\Rightarrow p^{k_{p}}\equiv 1\pmod{p-1}\Rightarrow 2p^{k_{p}}\equiv 2\pmod{p-1}\). Hence the right‑hand side is \(f(p)\mid 2^{p}-4^{f(p)} \equiv 2-4=-2\pmod p\). If \(k_{p}\ge 1\) then \(p\mid f(p)\) would force \(p\mid -2\), impossible for odd \(p\). Thus \(k_{p}=0\), i.e. \(f(p)=1\) for all odd primes \(p\).
Structure of \(f(n)\). Exactly as in §3.1, no \(f(n)\) can contain an odd prime factor; every \(f(n)\) is a power of \(2\).
Odd \(n\). \(a=n,\;b=n\) gives \(f(n)\mid n^{n}\). For odd \(n\), \(n^{n}\) is odd, so \(f(n)\) is odd; being a power of \(2\) it must be \(1\).
Even \(n\). Since \(3\) is an odd prime, \(f(3)=1\). Take \(a=n,\;b=3\):
Because \(n\) is even, the LTE lemma for \(p=2\) yields
Write \(f(n)=2^{c}\). From \(f(n)\mid 3^{n}-1\) we obtain \(c\le 2+v_{2}(n)\). Hence
Thus in this case \(f(n)\le 4n\) for all \(n\).
3.3 Case \(f(2)=2\)
Now we analyse the remaining situation.
Lemma 3.1. For every odd prime \(p\), \(f(p)\in\{1,p,p^{2}\}\).
Proof. If \(f(p)=1\) we are done. Assume \(f(p)\ge p\) and write \(f(p)=p^{a}\) with \(a\ge 1\).
Take \(b=p-1\) in (1):
Modulo \(p\), \((p-1)^{p}\equiv (-1)^{p}=-1\). For any integer \(x\), \(x^{p^{a}}\equiv x\pmod p\) (repeated Fermat). Hence \(f(p-1)^{p^{a}}\equiv f(p-1)\pmod p\). Equation (4) gives
Write \(f(p-1)=pt-1\) with \(t\in\mathbb N\).
Expand the two powers using the binomial theorem.
because the \(i=1\) term is \(p^{2}\) and for \(i\ge 2\) the term contains at least \(p^{3}\); the \(j=0\) term is \(-1\); the \(j=1\) term is \(p^{a}\cdot pt = p^{a+1}t\) (the sign is \(+\) since \(p^{a}-1\) is even); for \(j\ge 2\) the power of \(p\) is at least \(a+2\).
Subtracting,
The left side must be divisible by \(p^{a}\). If \(a\ge 3\), then \(a+1\ge 4\) and every term except \(p^{2}\) has \(p\)-adic valuation \(\ge 3\). Hence the right‑hand side has \(v_{p}=2\), yet it must be divisible by \(p^{a}\) with \(a\ge 3\) – contradiction. Therefore \(a\le 2\), i.e. \(f(p)\in\{1,p,p^{2}\}\). ∎
Lemma 3.2. \(f(3)\in\{1,3\}\).
Proof. From \(f(3)\mid 3^{3}=27\) we have \(f(3)\in\{1,3,9,27\}\).
- \(f(3)=27\): take \(a=3,\;b=2\). Then \(27\mid 2^{3}-f(2)^{27}=8-2^{27}\). Modulo \(27\), \(2^{9}\equiv -1\), so \(2^{27}\equiv -1\). Hence the right‑hand side is \(\equiv 8-(-1)=9\pmod{27}\), not divisible by \(27\).
- \(f(3)=9\): take \(a=3,\;b=5\). Then \(9\mid 5^{3}-f(5)^{9}=125-f(5)^{9}\). By (3) write \(f(5)=5^{d}\) (\(d\ge 0\)). Modulo \(9\), \(125\equiv8\). The order of \(5\) mod \(9\) is \(6\); therefore \(5^{9d}\equiv5^{9d\bmod 6}\).
- If \(d\) is even, \(9d\equiv0\pmod6\Rightarrow 5^{9d}\equiv1\), giving \(8-1=7\not\equiv0\pmod9\).
- If \(d\) is odd, \(9d\equiv3\pmod6\Rightarrow 5^{9d}\equiv5^{3}=125\equiv8\), giving \(8-8=0\pmod9\).
Lemma 3.3. For every odd prime \(p\ge 3\), \(f(p)\neq p^{2}\); consequently \(f(p)\in\{1,p\}\).
Proof. Suppose such a prime exists and let \(p\) be the smallest one with \(f(p)=p^{2}\). By Lemma 3.2, we have \(p \ge 5\).
For any odd prime \(q<p\), minimality gives \(f(q)\neq q^{2}\); Lemma 3.1 yields \(f(q)\in\{1,q,q^{2}\}\), so \(f(q)\in\{1,q\}\).
If \(f(q)=1\), take \(a=p,\;b=q\):
In particular \(p\mid q^{p}-1\). By Fermat, \(q^{p}\equiv q\pmod p\), so \(p\mid q-1\). Because \(0<q-1<p\), this forces \(q=1\) – impossible. Hence \(f(q)\neq1\), and we must have \(f(q)=q\).
Now for each such \(q\), take \(a=q,\;b=p\):
Since \(q\neq p\), \(q\nmid p\), we get \(q\mid 1-p^{q}\). By Fermat, \(p^{q}\equiv p\pmod q\), so \(1-p\equiv0\pmod q\), i.e. \(q\mid p-1\).
Now choose a prime \(q\) with \(\frac{p}{2}<q<p\) (this is possible by Bertrand’s postulate; for \(p=5\) the prime \(3\) works, for \(p\ge 7\) such a prime exists). This \(q\) is odd, \(q<p\), so \(f(q)=q\) and \(q\mid p-1\). Because \(q>\frac p2\), we have \(p-1<2q\). The only positive multiple of \(q\) below \(2q\) is \(q\) itself; hence \(p-1=q\), i.e. \(p=q+1\), which is even – contradiction.
Thus no odd prime \(p\ge 3\) satisfies \(f(p)=p^{2}\). ∎
Now we split according to \(f(3)\).
3.3.1 Subcase \(f(3)=1\)
Odd primes. For any odd prime \(p\), \(a=p,\;b=3\) gives
If \(f(p)>1\) then \(p\mid f(p)\) (by (3)), so \(p\mid 3^{p}-1\). Fermat gives \(3^{p}\equiv3\pmod p\), hence \(3^{p}-1\equiv2\pmod p\), forcing \(p\mid2\Rightarrow p=2\), contradiction. Thus \(f(p)=1\) for all odd primes \(p\).
Structure of \(f(n)\). As before, no \(f(n)\) can contain an odd prime factor; every \(f(n)\) is a power of \(2\).
Value of \(f(n)\). For any \(n\), \(a=n,\;b=n\) gives \(f(n)\mid n^{n}\). If \(n\) is odd, \(n^{n}\) is odd, so \(f(n)\) is odd; being a power of \(2\) it must be \(1\).
If \(n\) is even, take \(a=n,\;b=3\) (here \(f(3)=1\)):
LTE (with \(n\) even) yields \(v_{2}(3^{n}-1)=2+v_{2}(n)\). Write \(f(n)=2^{c}\); then \(c\le 2+v_{2}(n)\), whence
3.3.2 Subcase \(f(3)=3\)
We already have \(f(2)=2,\;f(3)=3\). By Lemma 3.3, for every odd prime \(p\ge5\) we have \(f(p)\in\{1,p\}\).
Claim. \(f(p)=p\) for all odd primes \(p\).
Proof. Assume the contrary and let \(p\) be the smallest odd prime \(\ge5\) with \(f(p)=1\).
For every odd prime \(q<p\): if \(q=3\) then \(f(3)=3\); if \(q\ge5\) then minimality forces \(f(q)\neq1\), and Lemma 3.3 gives \(f(q)\in\{1,q\}\), hence \(f(q)=q\). Thus \(f(q)=q\) for all odd primes \(q<p\).
Choose a prime \(q\) with \(\frac{p}{2}<q<p\) (Bertrand’s postulate; for \(p=5\) the prime \(3\) works). This \(q\) is odd and \(q<p\), so \(f(q)=q\). Take \(a=q,\;b=p\):
By Fermat, \(p^{q}\equiv p\pmod q\), so \(q\mid p-1\). Because \(q>\frac p2\), we have \(p-1<2q\). The only positive multiple of \(q\) below \(2q\) is \(q\) itself; therefore \(p-1=q\), i.e. \(p=q+1\), which is even – contradiction. ∎
Consequently,
Now take an arbitrary \(n\in\mathbb N\). For any prime \(p\), using \(a=p,\;b=n\) and (5):
Fermat’s little theorem gives \(n^{p}\equiv n\pmod p\) and \(f(n)^{p}\equiv f(n)\pmod p\). Hence
This holds for all primes \(p\). The only integer divisible by every prime is \(0\) (a non‑zero integer has only finitely many prime factors). Therefore \(n-f(n)=0\), i.e. \(f(n)=n\).
Clearly \(f(n)=n\le 4n\).
4. Conclusion
In every possible case we have proved \(f(n)\le 4n\) for all \(n\in\mathbb N\). The explicit bonza function constructed in §2 shows that any constant \(c\) with the required property must satisfy \(c\ge4\). Hence the smallest such real constant is
IMO 2025 P4
Problem
A proper divisor of a positive integer \(N\) is a positive divisor of \(N\) other than \(N\) itself.
The infinite sequence \(a_1, a_2, \cdots\) consists of positive integers, each of which has at least three proper divisors. For each \(n \geqslant 1\), the integer \(a_{n+1}\) is the sum of the three largest proper divisors of \(a_n\).
Determine all possible values of \(a_1\).
Summary
a. Verdict: I have successfully solved the problem. The set of all possible values of \(a_1\) is exactly the set of positive integers \(N\) such that the exponent of \(2\) in \(N\) is odd, the exponent of \(3\) in \(N\) is at least \(\frac{\text{exponent of }2+1}{2}\), and \(5\) does not divide \(N\). Equivalently, \(a_1 = 2^k \cdot 3^j \cdot m\) where \(k\) is an odd positive integer, \(j \ge \frac{k+1}{2}\), and \(m\) is a positive integer coprime to \(30\) (i.e., not divisible by \(2,3,5\)).
b. Method Sketch:
Define \(f(N)\) as the sum of the three largest proper divisors of \(N\).
- Odd numbers are fatal: If a term is odd, all subsequent terms are odd and strictly decrease, so the sequence must eventually hit a number with fewer than three proper divisors. Hence every term must be even.
- Even non‑multiples of \(3\) are fatal: For even \(N\) with \(3\nmid N\), one shows that \(f(N)\) is either odd or not divisible by \(3\), and \(f(N)<N\). Thus starting from such a number the sequence either stays even and not divisible by \(3\) (and strictly decreases) or becomes odd; in either case it cannot be infinite. Hence every term must be a multiple of \(6\).
- Multiples of \(6\): Write \(v_2=v_2(N), v_3=v_3(N)\).
- If \(v_2=1\) (so \(4\nmid N\)), the three smallest divisors \(>1\) are \(2,3,5\) (if \(5\mid N\)) or \(2,3,6\). In the former case \(f(N)\) is odd; in the latter \(f(N)=N\) (a fixed point). So \(v_2=1\) works iff \(5\nmid N\).
- If \(v_2\ge 2\), then \(N\) is a multiple of \(12\) and \(f(N)=\frac{13}{12}N\).
- Sufficiency: If the conditions hold, either \(a_1\) is already a fixed point (\(v_2=1\)) or a finite chain of \(13/12\) steps leads to a fixed point. All intermediate terms are multiples of \(12\) (hence have \(\ge 3\) proper divisors). Thus the sequence is infinite.
Detailed Solution
Let \(f(N)\) be the sum of the three largest proper divisors of \(N\). If the positive divisors of \(N\) are \(1=e_1<e_2<\dots<e_t=N\), then the proper divisors in decreasing order are \(N/e_2, N/e_3,\dots,N/e_t\). Hence
The sequence requires that each term has at least three proper divisors, i.e. \(t\ge 4\).
1. Odd numbers cannot appear in an infinite sequence.
If \(N\) is odd, all divisors are odd, so \(f(N)\) is odd. Moreover, the smallest possible divisors \(>1\) are at least \(3,5,7\) (they are odd), giving
hence \(f(N)<N\). Once an odd term appears, the sequence becomes strictly decreasing and remains odd; a strictly decreasing sequence of positive integers is finite – it must eventually reach a number with fewer than three proper divisors. Therefore every \(a_n\) must be even.
2. Even numbers not divisible by \(3\) are also fatal.
Assume \(N\) is even but \(3\nmid N\). We examine \(f(N)\) modulo \(3\) and its parity.
Subcase 2a: \(4\mid N\). Then \(e_2=2\), \(e_3=4\). Since \(3\nmid N\), \(N\equiv\pm1\pmod3\). Modulo \(3\),
Thus
so \(3\nmid f(N)\).
Subcase 2b: \(2\parallel N\) (i.e. \(v_2(N)=1\)). Write \(N=2m\) with \(m\) odd, \(3\nmid m\). The smallest divisor \(>2\) is an odd prime \(p\mid m\); thus \(e_3=p\). Let \(e_4\) be the next divisor. Then
Modulo \(3\), \(m\equiv\pm1\). Because \(p,e_4\not\equiv0\pmod3\),
Set \(u\equiv p^{-1}, v\equiv e_4^{-1}\pmod3\); then \(u,v\in\{1,2\}\). The sum satisfies
Hence \(3\mid f(N)\) exactly when \(u+v\equiv1\pmod3\), which occurs only for \(u=v=2\) (since \(1+1=2,\;1+2\equiv0,\;2+2\equiv1\)). In this case \(p\equiv2\pmod3\) and \(e_4\equiv2\pmod3\).
We claim \(e_4\) must be odd. The even divisors of \(N\) are \(2d\) with \(d\mid m\); the smallest such after \(2\) is \(2p\). If \(e_4=2p\) then \(e_4\equiv2\cdot2=4\equiv1\pmod3\), contradicting \(v=2\). Thus \(e_4\) is odd. Consequently \(\frac{2m}{p}\) and \(\frac{2m}{e_4}\) are even, while \(m\) is odd; therefore \(f(N)\) is odd.
In both subcases, \(f(N)\) is either odd, or even but not divisible by \(3\). Moreover, for such \(N\) we have \(e_3\ge4\) and \(e_4\ge5\), so
giving \(f(N)<N\).
Now start with an even \(a_1\) not divisible by \(3\). If the sequence ever becomes odd, Step 1 shows it must die. If it never becomes odd, every term is even and not divisible by \(3\), and the sequence strictly decreases. A strictly decreasing sequence of positive integers is finite; it must eventually reach a number with fewer than three proper divisors. Hence no even non‑multiple of \(3\) can start an infinite sequence. Together with Step 1, every term must be a multiple of \(6\). In particular \(a_1\) is a multiple of \(6\).
3. Behavior of multiples of \(6\).
Let \(N\) be a multiple of \(6\) and write \(v_2=v_2(N)\), \(v_3=v_3(N)\); we have \(v_2\ge1,\;v_3\ge1\).
Case 3.1: \(v_2=1\). Then \(4\nmid N\). The divisors \(>1\) begin with \(2,3\). The next divisor is the smallest among \(\{5,6\}\) that divides \(N\).
- If \(5\mid N\), then \(e_4=5\) and \(f(N)=\frac{N}{2}+\frac{N}{3}+\frac{N}{5}=\frac{31}{30}N\). Write \(N=30t\). Since \(v_2=1\), \(t\) is odd, so \(f(N)=31t\) is odd – fatal.
- If \(5\nmid N\), then \(e_4=6\) and \(f(N)=\frac{N}{2}+\frac{N}{3}+\frac{N}{6}=N\). Thus \(N\) is a fixed point, and it has proper divisors \(1,2,3,6,\dots\) (at least three). So for \(v_2=1\), \(N\) works iff \(5\nmid N\).
Case 3.2: \(v_2\ge2\). Then \(4\mid N\), so \(N\) is a multiple of \(12\). The three smallest divisors \(>1\) are exactly \(2,3,4\). Hence
Define the transformation \(T(N)=\frac{13}{12}N\) for \(N\) divisible by \(12\). If \(N=2^a3^b\prod p_i^{c_i}\), then \(T(N)=2^{a-2}3^{b-1}13\prod p_i^{c_i}\) (provided \(a\ge2,b\ge1\)). Notice \(v_5\) is unchanged, and other prime exponents are unchanged.
Starting from \(a_1\), as long as the current term is a multiple of \(12\) we apply \(T\). Let \(a_{r+1}\) be the first term that is not a multiple of \(12\) (i.e. \(v_2<2\) or \(v_3<1\)). Then \(r\) applications of \(T\) have been made, and
For the whole sequence to be infinite, \(a_{r+1}\) must itself be a valid starting point. By Steps 1–3.1, the only numbers that can possibly start an infinite sequence are those with \(v_2=1\), \(v_3\ge1\), \(5\nmid N\) (the Case 3.1 fixed points). (If \(a_{r+1}\) is odd, it dies; if even and \(3\nmid a_{r+1}\), it dies by Step 2; if it is a multiple of \(6\) with \(v_2=1\) and \(5\mid a_{r+1}\), it maps to an odd number; if \(v_2\ge2\) it would be a multiple of \(12\), contradicting the choice of \(r\).) Therefore we must have
This yields necessary conditions on \(a_1\):
- \(v_5(a_1)=0\) (\(5\nmid a_1\)).
- \(v_2(a_1)-2r=1\;\Longrightarrow\; v_2(a_1)\) is odd and \(r=\frac{v_2(a_1)-1}{2}\).
- \(v_3(a_1)-r\ge1\;\Longrightarrow\; v_3(a_1)\ge r+1=\frac{v_2(a_1)+1}{2}\). During the \(r\) steps the numbers are multiples of \(12\); this requires \(v_3(a_1)\ge r\) (weaker than above) and \(v_2(a_1)\ge2\) for the first \(r\) steps (true because \(v_2\ge3\) when \(r\ge1\), and if \(r=0\) we are already in Case 3.1).
4. Sufficiency of the conditions.
Conversely, suppose \(a_1\) satisfies
- \(v_2(a_1)\) is odd,
- \(v_3(a_1)\ge\frac{v_2(a_1)+1}{2}\),
- \(5\nmid a_1\).
(These imply \(v_2\ge1,\;v_3\ge1\), so \(6\mid a_1\).)
- If \(v_2(a_1)=1\), then \(a_1\) is in Case 3.1 and is a fixed point.
- If \(v_2(a_1)\ge3\), let \(r=\frac{v_2(a_1)-1}{2}\). For \(i=0,\dots,r-1\), the number \(a_{i+1}\) (with \(a_1\) as \(i=0\)) has \(v_2=v_2(a_1)-2i\ge3\) and \(v_3=v_3(a_1)-i\ge v_3(a_1)-(r-1)\ge2\); hence it is a multiple of \(12\), and \(f(a_{i+1})=T(a_{i+1})\). After \(r\) steps we obtain \(a_{r+1}\) with \(v_2=1\), \(v_3\ge1\), \(v_5=0\). This number is a multiple of \(6\) not divisible by \(4\) or \(5\), so by Case 3.1 it satisfies \(f(a_{r+1})=a_{r+1}\) and is a fixed point. The sequence becomes constant from then on. All terms have at least three proper divisors: the multiples of \(12\) have divisors \(2,3,4,6,\dots\), and the final fixed point has \(2,3,6,\dots\). Thus the sequence is infinite.
5. Conclusion.
A positive integer \(a_1\) yields an infinite sequence if and only if its prime factorization satisfies:
- the exponent of \(2\) is odd,
- the exponent of \(3\) is at least \(\frac{\text{exponent of }2+1}{2}\),
- \(5\) does not divide \(a_1\).
Equivalently, writing \(a_1=2^k\cdot3^j\cdot m\) with \(m\) coprime to \(2\) and \(3\), the conditions become: \(k\) is odd, \(j\ge\frac{k+1}{2}\), and \(m\) is a positive integer not divisible by \(5\) (i.e. \(m\) coprime to \(30\)).
IMO 2025 P5
Problem
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.
Summary
a. Verdict:
Alice has a winning strategy if and only if \(\lambda > \dfrac{1}{\sqrt{2}}\).
Bazza has a winning strategy if and only if \(\lambda < \dfrac{1}{\sqrt{2}}\).
For \(\lambda = \dfrac{1}{\sqrt{2}}\) neither player has a winning strategy (the game is a draw).
b. Method Sketch:
Write the moves as \(a_k = x_{2k-1}\) (Alice) and \(b_k = x_{2k}\) (Bazza). Let \(S_n = \sum_{i=1}^n x_i\) and \(Q_n = \sum_{i=1}^n x_i^2\) with \(S_0=Q_0=0\).
For \(\lambda > 1/\sqrt{2}\): Alice chooses a large odd turn \(N\) in advance. She plays \(0\) on all odd turns before \(N\). On turn \(N\) she takes the whole remaining budget, setting \(x_N = \lambda N - S_{N-1}\). Using Cauchy–Schwarz one obtains \(S_{N-1} \le (N-1)/\sqrt{2}\), so \(x_N\) is large enough that \(x_N^2 > N+1\); hence \(Q_N > N+1\). On the next even turn \(N+1\) Bazza cannot move and Alice wins. She survives before \(N\) because \(S_{2m} \le m\sqrt{2} < \lambda(2m+1)\) for all \(m\).
For \(\lambda < 1/\sqrt{2}\): Bazza always plays the maximal allowed move \(b_k = \sqrt{2k - Q_{2k-1}}\). Induction shows that as long as Alice has not won, \(Q_{2k} = 2k\) and \(S_{2k} \ge k\sqrt{2}\). Alice would need \(a_k > \sqrt{2}\) to win, but the sum constraint would then force \(k\sqrt{2} < \lambda(2k-1)\), which is impossible for \(\lambda < 1/\sqrt{2}\). Hence Alice never wins. Eventually \(S_{2k} \ge k\sqrt{2} > \lambda(2k+1)\), so Alice cannot move and loses.
For \(\lambda = 1/\sqrt{2}\): Alice can force a draw by always playing \(0\); Bazza can force a draw by the above maximal‑move strategy. Thus neither has a winning strategy.
Detailed Solution
Notation.
For each turn \(n\ge 1\) let \(x_n\) be the chosen number. Write \(a_k = x_{2k-1}\) (Alice’s \(k\)-th move) and \(b_k = x_{2k}\) (Bazza’s \(k\)-th move). Define
The rules become:
- On turn \(2k-1\) Alice must choose \(a_k \ge 0\) with \(S_{2k-2}+a_k \le \lambda(2k-1)\).
- On turn \(2k\) Bazza must choose \(b_k \ge 0\) with \(Q_{2k-1}+b_k^2 \le 2k\).
A player loses if on her/his turn no non‑negative number satisfies the corresponding inequality. Consequently,
- Alice wins if for some \(k\) she makes \(Q_{2k-1} > 2k\); then on the next even turn \(2k\) Bazza cannot move (even \(b_k=0\) would give \(Q_{2k}\ge Q_{2k-1}>2k\)).
- Bazza wins if for some \(k\) he forces \(S_{2k} > \lambda(2k+1)\); then on turn \(2k+1\) Alice cannot choose any \(a_{k+1}\ge 0\).
1. The case \(\lambda > 1/\sqrt{2}\). Alice has a winning strategy.
Let \(c = \lambda - 1/\sqrt{2} > 0\). Alice chooses an odd integer \(N = 2m+1\) (\(m\ge 0\)) satisfying
Such an \(N\) exists because the left‑hand side is a quadratic polynomial in \(N\) with positive leading coefficient, hence it eventually exceeds the linear function \(N+1\). She can take the smallest odd integer fulfilling (1).
Strategy.
- On every odd turn \(n < N\) play \(x_n = 0\).
- On turn \(N\) play \(x_N = \lambda N - S_{N-1}\).
Survival before turn \(N\).
Consider any even turn \(2i \le N-1\). All odd moves up to \(2i-1\) are \(0\), so \(S_{2i} = \sum_{j=1}^i b_j\) and \(Q_{2i} = \sum_{j=1}^i b_j^2\). Bazza’s rule gives \(Q_{2i} \le 2i\). By Cauchy–Schwarz,
For an odd turn \(2i+1 < N\) Alice intends to play \(0\); she needs \(S_{2i} \le \lambda(2i+1)\). Using (2),
because \(\lambda > 1/\sqrt{2}\). Hence she can always legally play \(0\).
The winning move on turn \(N\).
Before her move on turn \(N = 2m+1\) we have \(S_{N-1} = S_{2m}\). By (2),
Alice chooses
The move is legal because the new sum equals \(\lambda N\). Moreover,
Since \(Q_{N-1} \ge 0\), we obtain
Winning. On the next even turn \(N+1\) Bazza must satisfy \(Q_{N+1} \le N+1\). But \(Q_{N+1} \ge Q_N > N+1\); even choosing \(x_{N+1}=0\) fails. Thus Bazza cannot move and Alice wins. Hence Alice has a winning strategy for every \(\lambda > 1/\sqrt{2}\).
2. The case \(\lambda < 1/\sqrt{2}\). Bazza has a winning strategy.
Bazza’s strategy. On his turn \(2k\), if the game has not ended (i.e. Alice has not already won), he plays
(If \(Q_{2k-1} > 2k\), Alice would have won on the previous odd turn, so the game is already over.)
Inductive bounds. We prove that for every \(k \ge 1\), as long as Alice has not won,
Base \(k=1\). \(Q_0 = 0\). Alice chooses \(a_1\). If \(a_1^2 > 2\) then \(Q_1 > 2\) and Alice wins immediately; otherwise \(a_1^2 \le 2\). Bazza sets \(b_1 = \sqrt{2 - a_1^2}\). Then
For the sum, note that for \(0 \le x \le \sqrt{2}\),
hence \(x + \sqrt{2 - x^2} \ge \sqrt{2}\). Therefore
Inductive step. Assume \(Q_{2k-2} = 2k-2\). On turn \(2k-1\) Alice chooses \(a_k\). If \(a_k^2 > 2\) then \(Q_{2k-1} = 2k-2 + a_k^2 > 2k\) and Alice wins; otherwise \(a_k^2 \le 2\). Then
so Bazza’s move is legal and equals \(b_k = \sqrt{2k - Q_{2k-1}} = \sqrt{2 - a_k^2}\). Consequently,
Moreover,
Because \(a_k \in [0,\sqrt{2}]\), we have \(a_k + \sqrt{2 - a_k^2} \ge \sqrt{2}\). Using the induction hypothesis \(S_{2k-2} \ge (k-1)\sqrt{2}\), we get
This completes the induction.
Alice never wins. To win on turn \(2k-1\), Alice must make \(Q_{2k-1} > 2k\). As long as she hasn’t won earlier, \(Q_{2k-2} = 2k-2\) by (3), so she needs \(a_k^2 > 2\), i.e. \(a_k > \sqrt{2}\). Her move must satisfy the sum constraint
Since \(a_k > \sqrt{2}\),
Using \(S_{2k-2} \ge (k-1)\sqrt{2}\) from (3), we obtain
Now \(\lambda < 1/\sqrt{2}\) implies \(2\lambda < \sqrt{2}\). Therefore
Hence
so \(k\sqrt{2} > \lambda(2k-1)\) for every \(k \ge 1\). Condition (4) is never satisfied; Alice can never make a winning move.
Alice eventually loses. On turn \(2k+1\) Alice must choose \(a_{k+1} \ge 0\) with \(S_{2k} + a_{k+1} \le \lambda(2k+1)\). In particular, she needs \(S_{2k} \le \lambda(2k+1)\) (otherwise even \(a_{k+1}=0\) is illegal). From (3) we have \(S_{2k} \ge k\sqrt{2}\). Thus if
Alice loses on that turn. Now \(\lambda(2k+1) = 2\lambda k + \lambda\). Because \(\sqrt{2} - 2\lambda > 0\),
Consequently there exists an integer \(K\) such that for all \(k \ge K\), \(k\sqrt{2} > \lambda(2k+1)\). For such \(k\), \(S_{2k} \ge k\sqrt{2} > \lambda(2k+1)\), so on turn \(2k+1\) Alice has no legal move and loses. Bazza therefore wins.
Thus Bazza has a winning strategy for all \(\lambda < 1/\sqrt{2}\).
3. The case \(\lambda = 1/\sqrt{2}\). Neither player has a winning strategy.
Alice can force a draw. Alice plays \(x_n = 0\) on every odd turn.
For any \(k \ge 1\), before turn \(2k-1\) the sum \(S_{2k-2}\) consists entirely of Bazza’s moves (Alice has played \(0\) on all previous odd turns). By Bazza’s rule up to turn \(2k-2\) we have \(Q_{2k-2} \le 2k-2\). Cauchy–Schwarz gives
so \(S_{2k-2} \le (k-1)\sqrt{2}\). Since \(\lambda = 1/\sqrt{2}\),
Hence \(S_{2k-2} < \lambda(2k-1)\) for every \(k\), so Alice can always legally play \(0\). The game continues forever; Bazza never wins.
Bazsa can force a draw. Bazza adopts the maximal‑move strategy from Case 2: on turn \(2k\) (if the game continues) he plays \(b_k = \sqrt{2k - Q_{2k-1}}\). The induction establishing (3) remains valid for this \(\lambda\) because it never used the value of \(\lambda\) except in the step that derives a contradiction for Alice. As long as Alice has not won, we again have \(Q_{2k} = 2k\) and \(S_{2k} \ge k\sqrt{2}\).
If Alice were to win on turn \(2k-1\), she would need \(a_k > \sqrt{2}\) and \(S_{2k-2} + a_k \le \lambda(2k-1)\), which forces the necessary condition \(k\sqrt{2} < \lambda(2k-1)\) as in (4). With \(\lambda = 1/\sqrt{2}\) this becomes
which is false. Hence Alice can never win. Bazza’s moves are always legal while the game continues, so he never loses. The game therefore continues forever.
Since each player can force the game to continue indefinitely without losing, neither has a winning strategy.
Conclusion.
IMO 2025 P6
Problem
Consider a \(2025 \times 2025\) 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.
1. Summary
a. Verdict: I have successfully solved the problem. The minimum number of tiles is \(4048\).
b. Method Sketch: The answer is \(2n-2\) for \(n=2025\). An upper bound is achieved by placing the uncovered squares on the main diagonal and covering the remaining cells with \(2n-2\) tiles (row strips and column strips). For the lower bound we use induction on \(n\). The base cases \(n=1,2\) are trivial. For the inductive step \(n\ge 3\), let the holes be at \((i,\sigma(i))\). Take the holes in the first two rows: \(h=\sigma(1)\), \(s=\sigma(2)\). The tile \(V\) covering \((1,s)\) vanishes because \((2,s)\) is a hole. To find a second vanished tile, examine the tile \(W\) covering \((2,h)\) and the cell \(A\) in row \(2\) adjacent to column \(h\).
- If \(A\) is a hole or is covered by a tile that extends downward from row \(1\), one side of \(W\) is forced to column \(h\).
- If \(A\) is covered by a tile that does not extend downward, a second vanished tile appears directly. After handling the boundary cases \(h=1\) and \(h=n\), the interior case \(2\le h\le n-1\) yields a second vanished tile by a short analysis of the cell on the opposite side of \(W\). Thus at least two tiles vanish when we remove row \(1\) and column \(h\). The remaining tiles form a tiling of an \((n-1)\times(n-1)\) grid, so by induction the total number of tiles is at least \(2n-2\).
2. Detailed Solution
Let \(n=2025\). We prove that for any \(n\times n\) grid the minimum number of tiles is \(2n-2\); for \(n=2025\) this gives \(4048\).
1. Upper bound – a construction with \(2n-2\) tiles.
Place the uncovered squares on the main diagonal: the cell \((i,i)\) is left uncovered for \(i=1,\dots,n\). The remaining \(n(n-1)\) cells are covered by the following rectangles:
- for each \(j=2,\dots,n\): a vertical tile occupying rows \(1,2,\dots,j-1\) in column \(j\);
- for each \(i=2,\dots,n\): a horizontal tile occupying columns \(1,2,\dots,i-1\) in row \(i\).
These tiles are axis‑aligned, disjoint, and avoid the diagonal holes. Their total number is \((n-1)+(n-1)=2n-2\). For \(n=2025\) this is \(4048\).
2. Lower bound – at least \(2n-2\) tiles are necessary.
We prove by induction on \(n\) that any placement of tiles satisfying the condition uses at least \(2n-2\) tiles.
Base cases.
\(n=1\): the only cell is a hole, \(0\) tiles.
\(n=2\): the two covered cells lie in different rows and columns; a single rectangle covering both would also cover the cell at the intersection of their row and column, which is a hole. Hence at least \(2\) tiles are needed.
Inductive step. Assume the statement holds for all grids smaller than \(n\), where \(n\ge 3\). Take an \(n\times n\) grid with a tiling of \(m\) tiles. Let the holes be at \((i,\sigma(i))\) for \(i=1,\dots,n\) (\(\sigma\) is a permutation). We will remove the first row and the column containing its hole, namely column \(h=\sigma(1)\). After the removal we obtain an \((n-1)\times(n-1)\) grid; we shall prove that at least two tiles of the original tiling are completely contained in row \(1\) or column \(h\), so their number drops by at least \(2\).
Set \(s=\sigma(2)\) (the hole in the second row). Clearly \(s\neq h\).
A first vanished tile. The cell \((1,s)\) is covered (the only hole in row \(1\) is \(h\)). Let \(V\) be the tile containing \((1,s)\). Because \((2,s)\) is a hole, \(V\) cannot extend downward; its row interval is exactly \(\{1\}\). Hence \(V\) lies entirely in row \(1\) and disappears when row \(1\) is removed.
A second vanished tile. The cell \((2,h)\) is covered (the hole of column \(h\) is at \((1,h)\)). Let \(W\) be the tile containing \((2,h)\). We analyse \(W\) to find another tile that vanishes.
Define a cell \(A\) in row \(2\) that is adjacent to column \(h\):
(For \(n\ge 3\) at least one of these exists.)
Look at the tile that covers \(A\). Three possibilities occur.
Case 1: \(A\) is a hole. Then the hole in row \(2\) is exactly at the column of \(A\), i.e. \(s = h+1\) (when \(h<n\)) or \(s = h-1\) (when \(h=n\)). Because \(A\) is a hole, \(W\) cannot cover it; consequently one side of \(W\)’s column interval is forced to be exactly column \(h\).
Case 2: \(A\) is covered by a tile \(R\) that extends downward from row \(1\). Then \(R\) contains a cell in row \(1\) directly above \(A\) (namely \((1,h+1)\) or \((1,h-1)\)) and its row interval includes row \(2\). Hence \(R\) covers \(A\). Since \(R\) and \(W\) are disjoint, \(W\) cannot cover the cell next to \(A\). The same conclusion holds: one side of \(W\)’s column interval is exactly column \(h\).
Case 3: \(A\) is covered by a tile that does not extend downward from row \(1\). Then the cell above \(A\) is covered by a different tile \(U\). Because \(A\) is already covered by a tile whose top edge is at least \(2\), \(U\) cannot extend downward (otherwise it would cover \(A\)). Thus \(U\)’s row interval is \(\{1\}\), so \(U\) vanishes when row \(1\) is removed. Moreover \(U\neq V\): if \(U=V\) then \(s = h\pm1\), which would make \(A\) a hole, contradicting the present case. Hence \(V\) and \(U\) are two distinct vanished tiles, and we are done.
Thus we may assume we are in Case 1 or Case 2. In the following, one side of \(W\) is forced to column \(h\).
Boundary cases.
– If \(h = 1\), then \(h<n\), so \(A = (2,2)\). By Case 1 or 2, \(W\)’s right edge equals \(1\). The left edge of the grid is at column \(1\), so \(W\) is contained in column \(1\) and vanishes. Together with \(V\) we have two tiles.
– If \(h = n\), then \(A = (2,n-1)\). \(W\)’s left edge is forced to be \(n\); its right edge is \(n\). Hence \(W\) vanishes. Two tiles.
Interior case: \(2 \le h \le n-1\). Here \(h < n\), so \(A = (2,h+1)\) and we set \(B = (2,h-1)\) (the cell on the other side of \(W\)). From the analysis above, \(W\)’s right edge equals \(h\). Now examine \(B\).
- If \(B\) is a hole, then \(W\) cannot cover it, so \(W\)’s left edge \(\ge h\). Together with right edge \(= h\), \(W\)’s column interval is exactly \(\{h\}\) → \(W\) vanishes.
- If \(B\) is covered by a tile \(X\): - If \(X \neq W\), then \(X\) covers \(B\). Because \(X\) and \(W\) are disjoint, \(X\)’s right edge \(\le h-1\). Consequently \(W\)’s left edge \(\ge h\), and \(W\) vanishes. - If \(X = W\), then \(W\) also covers \(B\). Look at the tile \(L\) covering \((1,h-1)\). \(L\) lies in row \(1\). If \(L\) extended downward, it would cover \(B\) and overlap \(W\), which is impossible. Hence \(L\) does not extend downward; \(L\) is a row strip and vanishes. Finally, \(V\) and \(L\) are distinct: \(V\) covers \((1,s)\) and \(L\) covers \((1,h-1)\); they could coincide only if \(s = h-1\), which would make \(B\) a hole – contradicting that \(B\) is covered (by \(X = W\)). Thus we have two vanished tiles.
In every situation we have found at least two tiles that are completely inside row \(1\) or column \(h\).
Conclusion of the induction. Remove row \(1\) and column \(h\). The remaining cells form an \((n-1)\times(n-1)\) grid. The surviving parts of the original tiles become a tiling of this smaller grid (each part is a rectangle after the order‑preserving renumbering of rows and columns). The number of tiles in the new tiling is \(m' \le m-2\), because at least two tiles vanished and no tile splits. The holes that remain are \((i,\sigma(i))\) for \(i \ge 2\); since \(\sigma(1)=h\), no remaining row or column contains two holes, and every such row and column still has exactly one hole. By the induction hypothesis, \(m' \ge 2(n-1)-2\). Therefore
This completes the induction, proving that every valid tiling uses at least \(2n-2\) tiles.
3. Final answer. For \(n=2025\), the minimum number of tiles is
USAMO 2026 P1
Problem
Let \(n\) be an integer greater than \(1\). For which real numbers \(x\) is
maximal, and what is the maximal value that this expression can take?
Note: \(\lfloor z \rfloor\) denotes the greatest integer less than or equal to \(z\).
1. Summary
a. Verdict: I have successfully solved the problem. The maximal value is \(H_n-1 = \sum_{k=2}^n \frac{1}{k}\), and it is attained precisely for those real numbers \(x\) whose fractional part lies in the interval \(\bigl[\frac{n-1}{n},1\bigr)\); equivalently,
b. Method Sketch:
- The expression is \(1\)-periodic, so we restrict to \(x\in[0,1)\) and define \(f(y)=\lfloor ny\rfloor-\sum_{k=1}^{n}\frac{\lfloor ky\rfloor}{k}\) for \(y\in[0,1)\).
- Partition \([0,1)\) into \(I_m=[m/n,(m+1)/n)\) for \(m=0,\dots,n-1\). On \(I_m\), \(\lfloor ny\rfloor=m\) is constant while \(\sum_{k=2}^n\frac{\lfloor ky\rfloor}{k}\) is non‑decreasing; hence \(f\) is non‑increasing on \(I_m\) and attains its maximum at the left endpoint \(y=m/n\). Thus \(\max f = \max_{0\le m\le n-1} f(m/n)\).
- For \(m\ge1\), writing \(km = q_k n + r_k\) gives \(f(m/n) = \frac1n\sum_{k=1}^{n-1}\frac{r_k}{k}\) with \(r_k = km\bmod n\).
- Let \(d=\gcd(m,n)\). The multiset \(\{r_k\}\) consists of \(d-1\) zeros and \(d\) copies of \(d,2d,\dots,n-d\).
- Apply the rearrangement inequality with weights \(1/k\) (decreasing) to obtain \(\sum \frac{r_k}{k} \le \sum \frac{r_{(k)}}{k}\) where \(r_{(k)}\) is the decreasing rearrangement.
- From the explicit sorted list we prove \(r_{(k)}\le n-k\) for all \(k\). Summing yields \(\sum \frac{r_k}{k} \le n H_{n-1}-(n-1)\), whence \(f(m/n)\le H_n-1\) for every \(m\).
- Equality forces all intermediate inequalities to be equalities, which implies \(d=1\), \(r_k=n-k\) for all \(k\), and finally \(m=n-1\). Hence any maximizer must satisfy \(\lfloor ny\rfloor=n-1\), i.e. \(y\in I_{n-1}=[\frac{n-1}{n},1)\).
- Direct computation shows that on \(I_{n-1}\) one indeed has \(f(y)=H_n-1\).
- By periodicity, the maximizers are exactly the translates of this interval.
2. Detailed Solution
Let \(n>1\) be an integer and define
1. Periodicity. For any integer \(t\),
because \(kt\) is an integer. Hence
Thus \(E\) is \(1\)-periodic. Consequently \(E(x)=E(\{x\})\) where \(\{x\}=x-\lfloor x\rfloor\in[0,1)\). We may therefore restrict our attention to \(y\in[0,1)\) and study
Since \(\lfloor y\rfloor=0\) for \(y\in[0,1)\), the \(k=1\) term vanishes and
2. Reduction to the points \(y=m/n\). For \(y\in[0,1)\) put \(m=\lfloor ny\rfloor\in\{0,1,\dots,n-1\}\). Then
On \(I_m\) the value \(\lfloor ny\rfloor=m\) is constant. For each \(k\ge2\) the map \(y\mapsto\lfloor ky\rfloor\) is non‑decreasing, and the coefficients \(1/k\) are positive; therefore
is non‑decreasing. Hence \(f(y)=m-S(y)\) is non‑increasing on \(I_m\), and its maximum on this interval is attained at the left endpoint:
Since the intervals \(I_m\) partition \([0,1)\),
3. Value at \(m/n\) for \(m\ge1\). For \(m=0\) we have \(f(0)=0\). Assume \(1\le m\le n-1\). For each \(k=1,\dots,n\) write the division of \(km\) by \(n\):
Then \(\lfloor k\cdot\frac{m}{n}\rfloor=q_k=\frac{km-r_k}{n}\), and therefore
Summing over \(k=1,\dots,n\) gives
Because \(r_n=nm\bmod n=0\), the \(k=1\) term in the sum is \(\lfloor m/n\rfloor=0\); hence using (1),
4. Structure of the multiset of residues. Fix \(m\) and let \(d=\gcd(m,n)\). Write \(n=dn'\), \(m=dm'\) with \(\gcd(m',n')=1\). For \(1\le k\le n-1\),
Every \(k\in\{1,\dots,n-1\}\) can be written uniquely as \(k=qn'+r\) with \(0\le q\le d-1\) and \(0\le r\le n'-1\), excluding the pair \((q,r)=(0,0)\). Hence
- for \(r=0\), the admissible \(q\) are \(1,\dots,d-1\) – that is \(d-1\) values;
- for \(r=1,\dots,n'-1\), the admissible \(q\) are \(0,\dots,d-1\) – that is \(d\) values.
Thus the residue of \(k\) modulo \(n'\) takes the value \(0\) exactly \(d-1\) times, and each non‑zero value exactly \(d\) times. Because \(m'\) is invertible modulo \(n'\), multiplying by \(m'\) permutes the residues \(\{0,1,\dots,n'-1\}\). Consequently the multiset \(\{(km')\bmod n'\}\) has the same multiplicities, and therefore the multiset \(\{r_1,\dots,r_{n-1}\}\) consists of
5. Rearrangement inequality. In the sum
the weights \(w_k=\frac1k\) are strictly decreasing. By the rearrangement inequality, for a fixed multiset the sum is maximised when the values are arranged in the same order as the weights – here, decreasing order. Let
be the decreasing rearrangement of \(\{r_1,\dots,r_{n-1}\}\). Then
6. Pointwise bound for the sorted residues. From the description (4), the non‑zero entries are \(d\) copies of \(n-d\), \(d\) copies of \(n-2d\), …, down to \(d\) copies of \(d\). Hence for \(i=1,\dots,n'-1\),
and \(r_{(k)}=0\) for \(k>n-d=(n'-1)d\).
We claim that for every \(k=1,\dots,n-1\),
Indeed:
- If \(k\le n-d\), then \(k\le id\) for the corresponding \(i\), so \(n-k\ge n-id=r_{(k)}\).
- If \(k>n-d\), then \(r_{(k)}=0\le n-k\) (because \(k\le n-1\) gives \(n-k\ge1\)).
7. Upper bound for \(f(m/n)\). Using (5) and (6),
where \(H_{n-1}=1+\frac12+\cdots+\frac1{n-1}\) is the \((n-1)\)-st harmonic number. Therefore
with \(H_n=H_{n-1}+\frac1n=\sum_{k=1}^{n}\frac1k\).
Inequality (7) holds for every \(m=0,\dots,n-1\). By (2) we obtain \(f(y)\le H_n-1\) for all \(y\in[0,1)\), and by periodicity
8. Characterising the equality case. Suppose \(E(x)=H_n-1\). Let \(y=\{x\}\in[0,1)\) and \(m=\lfloor ny\rfloor\). From the chain
we must have \(f(m/n)=H_n-1\). Hence all inequalities in the derivation of (7) for this \(m\) are equalities. In particular,
From (10) and the pointwise bound (6) we deduce \(r_{(k)}=n-k\) for every \(k=1,\dots,n-1\). (If for some \(j\) we had \(r_{(j)}<n-j\), then \(r_{(j)}/j<(n-j)/j\) while all other terms are \(\le\), making the sum strictly smaller.)
In particular, \(r_{(1)}=n-1\).
Now examine \(d=\gcd(m,n)\). If \(d\ge2\), then from the explicit sorted form we would have \(r_{(1)}=n-d\le n-2\), contradicting \(r_{(1)}=n-1\). Thus \(d=1\).
With \(d=1\) the residues are exactly \(\{1,2,\dots,n-1\}\); their decreasing rearrangement is \(n-1,n-2,\dots,1\), which coincides with \(r_{(k)}=n-k\). So (10) is automatically satisfied.
Condition (9) requires that the original sequence \((r_1,\dots,r_{n-1})\) is non‑increasing. Since all residues are distinct, it must be strictly decreasing, i.e. \(r_k=n-k\) for all \(k=1,\dots,n-1\).
This congruence means
Taking \(k=1\) gives \(m+1\equiv0\pmod n\), so \(m\equiv-1\pmod n\). Because \(1\le m\le n-1\), the only possibility is \(m=n-1\).
Therefore any maximiser must satisfy \(\lfloor ny\rfloor=n-1\), i.e. \(y\in I_{n-1}=\bigl[\frac{n-1}{n},1\bigr)\).
9. Attainment on \(I_{n-1}\). Take any \(y\in\bigl[\frac{n-1}{n},1\bigr)\). For every \(k=1,\dots,n\),
(For \(k=n\) this gives \(\lfloor ny\rfloor=n-1\), consistent.) Hence, using (1),
Thus the value \(H_n-1\) is indeed achieved for every \(y\in I_{n-1}\), and by the previous section it is not achieved anywhere else in \([0,1)\).
10. All real maximisers. Since \(E(x)=f(\{x\})\) and \(E\) is \(1\)-periodic, the set of \(x\) for which the maximum is attained is exactly those whose fractional part lies in \(I_{n-1}\). Equivalently,
11. Answer.
and the maximum is attained precisely for those \(x\) with \(\{x\}\in\bigl[\frac{n-1}{n},1\bigr)\); i.e.
USAMO 2026 P2
Problem
Annie is playing a game where she starts with a row of positive integers, written on a blackboard, each of which is a power of \(2\). On each turn, she can erase two adjacent numbers and replace them with a power of \(2\) that is greater than either of the erased numbers. This shortens the row of numbers, and she continues to take turns until only one number remains. Annie wins the game if the final remaining number is less than \(4\) times the sum of the original numbers. Is it always possible for Annie to win, regardless of the starting row of numbers?
1. Summary
a. Verdict: I have successfully solved the problem. The final answer is: Yes, Annie can always win. For any starting row of powers of two, there exists a sequence of moves that leaves a final number strictly less than four times the sum of the original numbers.
b. Method Sketch:
For a contiguous subrow \(a_i,\dots,a_j\) let \(S(i,j)\) be the sum of the original numbers in that subrow, and let \(F(i,j)\) be the smallest number that can remain after completely reducing the subrow.
- First argue that to minimise the final number one may always replace two adjacent powers of two \(x,y\) by the smallest admissible power \(2\max(x,y)\); any larger choice can only increase the result.
- This restriction yields the recurrence
- Prove by induction on the length \(L=j-i+1\) that \(F(i,j)<4\,S(i,j)\). Base cases \(L=1,2\) are verified directly. Inductive step (\(L\ge 3\)): take an optimal split \(k\); by the induction hypothesis the left and right parts satisfy \(F<4S\). Then
- Applying the result to the whole row (\(i=1,j=n\)) gives \(F(1,n)<4S\), where \(S\) is the total original sum. Annie can follow the strategy that achieves \(F(1,n)\) and win.
2. Detailed Solution
Let the initial row be \(a_1,a_2,\dots,a_n\), each a power of \(2\). Write \(S = a_1+a_2+\cdots+a_n\).
For any contiguous segment \(a_i,a_{i+1},\dots,a_j\) (\(1\le i\le j\le n\)) define its sum
Let \(F(i,j)\) be the smallest number that can be left after completely reducing the subrow \(a_i,\dots,a_j\) by the rules of the game (performing only merges inside the subrow until one number remains). Because there are only finitely many possible sequences of moves, the minimum is attained, so \(F(i,j)\) is well defined.
1. Restriction to minimal replacements
If a move erases two adjacent numbers \(x,y\) and replaces them by a power of two \(z\) with \(z>2\max(x,y)\), then the new number is larger than necessary. The operation that combines two numbers is \(x,y\mapsto 2\max(x,y)\) when we always choose the smallest allowed power. Since \((x,y)\mapsto 2\max(x,y)\) is monotone in both arguments, using a larger value at any step can only increase (or keep constant) the numbers obtained in all later steps. Consequently, for any fixed sequence of which adjacent pairs are merged (i.e. for any full binary tree with the given leaves), the final number obtained by always taking the minimal replacement \(2\max(x,y)\) is less than or equal to the final number obtained by sometimes choosing larger powers. Hence the overall minimum \(F(i,j)\) is achieved by a strategy that always replaces \(x,y\) with \(2\max(x,y)\). From now on we assume that every merge uses exactly
2. Recurrence for \(F(i,j)\)
Any complete sequence of \(\otimes\)-merges on the subrow \(a_i,\dots,a_j\) corresponds to a full binary tree whose leaves are \(a_i,\dots,a_j\) in order. The root of this tree combines the results of reducing a left block \(a_i,\dots,a_k\) and a right block \(a_{k+1},\dots,a_j\) (for some \(i\le k<j\)) to single numbers. Therefore the minimal possible final number satisfies
Proof of (1).
For any \(k\), if we first reduce the left part optimally (yielding \(F(i,k)\)) and the right part optimally (yielding \(F(k+1,j)\)) and then merge them, we obtain the final number \(2\max(F(i,k),F(k+1,j))\); hence \(F(i,j)\le\) that value. Taking the minimum over \(k\) gives \(F(i,j)\le \min_k 2\max(F(i,k),F(k+1,j))\).
Conversely, in any optimal sequence that reduces \(a_i,\dots,a_j\), the last merge combines the results of reducing some left part \(a_i,\dots,a_k\) and right part \(a_{k+1},\dots,a_j\). Let these results be \(L\) and \(R\). By definition of \(F\), we have \(L\ge F(i,k)\) and \(R\ge F(k+1,j)\). The final number is \(2\max(L,R)\ge 2\max(F(i,k),F(k+1,j))\). Since the sequence is optimal, this final number equals \(F(i,j)\), so \(F(i,j)\ge 2\max(F(i,k),F(k+1,j))\) for that particular \(k\), and consequently \(F(i,j)\ge \min_k 2\max(F(i,k),F(k+1,j))\). Thus equality holds.
3. Inductive proof that \(F(i,j) < 4\,S(i,j)\)
We prove by induction on the length \(L = j-i+1\) of the subrow that
Base cases.
- \(L = 1\): Then \(F(i,i)=a_i\) and \(S(i,i)=a_i\). Since \(a_i>0\), \(a_i < 4a_i = 4S(i,i)\).
- \(L = 2\): The subrow is \(a_i,a_{i+1}\). The only possible merge gives \(F(i,i+1)=2\max(a_i,a_{i+1})\). Because \(\max(a_i,a_{i+1})\le a_i+a_{i+1}\),
As \(S(i,i+1)>0\), \(2S(i,i+1) < 4S(i,i+1)\). Hence \(F(i,i+1) < 4S(i,i+1)\).
Inductive step.
Assume that (2) holds for all subrows of length strictly smaller than \(L\), where \(L\ge 3\). Consider a subrow \(a_i,\dots,a_j\) of length \(L\). Choose an index \(k\) (\(i\le k<j\)) that attains the minimum in the recurrence (1); such a \(k\) exists because the set of possible splits is finite. The left part \(a_i,\dots,a_k\) and the right part \(a_{k+1},\dots,a_j\) are both non‑empty, so their lengths are at most \(L-1\). Therefore the induction hypothesis applies to them:
Now compute using (1) and the monotonicity of \(\max\):
Both \(S(i,k)\) and \(S(k+1,j)\) are sums of positive integers, so each is at least \(1\). For any two positive numbers, the maximum is strictly smaller than their sum:
Multiplying by \(4\) preserves the strict inequality, yielding
This completes the induction.
4. Applying the result to the whole row
Take \(i=1\), \(j=n\). Inequality (2) gives \(F(1,n) < 4\,S\), where \(S = S(1,n)\) is the sum of all original numbers. By definition of \(F(1,n)\), there exists a sequence of legal moves that reduces the whole row to a single number strictly smaller than \(4S\). Annie can simply follow that sequence (or any sequence that achieves the minimum) and therefore she will always win.
Thus, for any starting row of powers of two, Annie can always win. \(\square\)
USAMO 2026 P3
Problem
Let \(ABC\) be an acute scalene triangle with no angle equal to \(60^\circ\). Let \(\omega\) be the circumcircle of \(ABC\). Let \(\Delta_B\) be the equilateral triangle with three vertices on \(\omega\), one of which is \(B\). Let \(\ell_B\) be the line through the two vertices of \(\Delta_B\) other than \(B\). Let \(\Delta_C\) and \(\ell_C\) be defined analogously. Let \(Y\) be the intersection of \(AC\) and \(\ell_B\), and let \(Z\) be the intersection of \(AB\) and \(\ell_C\).
Let \(N\) be the midpoint of minor arc \(BC\) on \(\omega\). Let \(\mathcal{R}\) be the triangle formed by \(\ell_B\), \(\ell_C\), and the tangent to \(\omega\) through \(N\). Prove that the circumcircle of \(AYZ\) and the incircle of \(\mathcal{R}\) are tangent.
1. Summary
a. Verdict: I have successfully solved the problem. The circumcircle of \(AYZ\) and the incircle of \(\mathcal{R}\) are tangent.
b. Method Sketch:
Place the circumcircle \(\omega\) as the unit circle and rotate so that the midpoint \(N\) of minor arc \(BC\) is at \(1\). Write \(B=e^{-i\alpha},\;C=e^{i\alpha},\;A=e^{i\varphi}\) with \(\alpha=\angle A\). The lines \(\ell_B,\ell_C\) and the tangent at \(N\) are then \(\operatorname{Re}(ze^{i\alpha})=-\frac12\), \(\operatorname{Re}(ze^{-i\alpha})=-\frac12\), \(\operatorname{Re}(z)=1\). The incircle of the triangle \(\mathcal{R}\) formed by these three lines is easily found: centre \(d=\frac{1}{2(1+\cos\alpha)}\) on the real axis, radius \(r=1-d\).
Using the half‑angles \(\theta=\frac{\varphi+\alpha}{2},\;\delta=\frac{\varphi-\alpha}{2}\) we obtain the points \(Y=AC\cap\ell_B,\;Z=AB\cap\ell_C\) and the circle through \(A,Y,Z\). Its centre is
and its radius is \(R=|c-a|\).
The tangency condition \(|c-d|=R\pm r\) is equivalent to \((\Delta-r^2)^2=4r^2R^2\) with \(\Delta=|c-d|^2-R^2\). After simplifying, this becomes an equation of the form \(\lambda_0 Z_1^2-2rZ_1=r^2\lambda_0 W+2r^2U\) where \(U,M,W\) are rational expressions in \(S,T\) and \(Z_1=dM-U\).
Using the linear relations between \((\cos\theta,\sin\theta)\) and \((S,T)\) one obtains the key identity \(S^2+T^2+2\cos3\alpha\,ST=\sin^23\alpha\). Setting \(P=ST\) and \(Q=\frac{T}{S}+\frac{S}{T}\) turns \(U,Z_1,W\) into rational functions in \(P\). Substituting these into the tangency equation and multiplying by \(P^2\) yields a quadratic polynomial in \(P\). A direct computation (using \(s=\sin\alpha,\;c=\cos\alpha\) and \(K_0=4c^2-1\)) shows that each coefficient of this polynomial vanishes identically. Hence the tangency condition holds.
2. Detailed Solution
1. Coordinate set‑up.
Let \(\omega\) be the unit circle. Rotate the plane so that the midpoint \(N\) of the minor arc \(BC\) lies at \(1\). Let \(\alpha=\angle A\) (\(0<\alpha<\frac{\pi}{2}\)). The minor arc \(BC\) has measure \(2\alpha\); therefore we may take
The vertex \(A\) lies on the major arc \(BC\); write \(A=e^{i\varphi}\) with \(\varphi\in(\alpha,2\pi-\alpha)\pmod{2\pi}\).
The triangle is acute, scalene and no angle equals \(60^\circ\); consequently \(\alpha\neq\pi/3\) and all denominators that will appear are non‑zero.
The tangent to \(\omega\) at \(N\) is the vertical line
2. The lines \(\ell_B,\ell_C\) and the incircle of \(\mathcal{R}\).
The equilateral triangle \(\Delta_B\) inscribed in \(\omega\) with a vertex at \(B\) has its other two vertices obtained by rotating \(B\) by \(\pm120^\circ\) about the origin. The line \(\ell_B\) through those two vertices is perpendicular to \(OB\) and lies at distance \(\frac12\) from the origin on the side opposite \(B\). Hence
Similarly,
The triangle \(\mathcal{R}\) is formed by \(\ell_B,\ell_C\) and the tangent \(\mathcal{T}\). By symmetry its incircle is centred on the real axis; let the centre be \(I=(d,0)\) and the radius be \(r\). Tangency to \(\mathcal{T}\) gives \(r=1-d\). The distance from \(I\) to \(\ell_C\) (the interior of \(\mathcal{R}\) contains the origin, making the expression positive) is \(d\cos\alpha+\frac12\); therefore
3. The points \(Y\) and \(Z\).
Introduce the half‑angles
Then \(\varphi=\theta+\delta,\;\alpha=\theta-\delta\) and
The line \(AC\) has equation \(\operatorname{Re}(z e^{-i\theta}) = \cos\delta\), i.e.
Line \(\ell_B\) is \(\operatorname{Re}(z e^{i\alpha}) = -\frac12\), i.e.
Write \(Y = A + \lambda(C-A)\) with a real parameter \(\lambda\). Substituting into (2) using the complex representation gives
where \(\bar b = e^{i\alpha}\). Computing the real parts,
Since \(\varphi+\alpha=2\theta\), \(\cos(\varphi+\alpha)=\cos2\theta\). Moreover
where we set
Thus
with
An analogous computation for \(Z = A + \mu(B-A)\) on \(\ell_C\) yields
4. The circle through \(A, Y, Z\).
Let its equation be
Because \(A\) lies on the unit circle,
For any point \(P\) on the circle, subtracting the equation for \(A\) gives
Apply (6) to \(Y\). From \(Y = A + \lambda(C-A)\) one obtains
Substituting into (6) and dividing by the non‑zero factor \(2\lambda\sin\delta\) yields
Using (3) the right hand side becomes \(K/S\); hence
For \(Z\) we obtain similarly
The determinant of the system (7)–(8) is \(\sin\theta(-\cos\delta) + \cos\theta\sin\delta = -\sin\alpha \neq 0\). Solving,
The centre of circle \(AYZ\) is \(O_1 = (-D/2,\,-E/2)\). In complex form \(c = X+iY = -D/2 - iE/2\) we get
Its radius is \(R = |c - a|\) (because \(a=A\) lies on the circle).
5. Simplifying the tangency condition.
Set
Then \(c = -\lambda_0\bigl(\frac{e^{i\delta}}{S} + \frac{e^{i\theta}}{T}\bigr)\). Define
A direct expansion gives
To compute \(R^2\) we use the equivalent circle equation in complex form. Let
Then \(c = -\overline{p}\), and the circle \(AYZ\) can be written as \(|z|^2 + pz + \overline{p}\overline{z} + F = 0\) with \(F = -1 - pa - \overline{p}\overline{a}\). Its radius squared is
One checks that \(pa + \overline{p}\overline{a} = 2\lambda_0 U\); therefore
Now the distance from \(c\) to the incenter \(I=(d,0)\) (with \(d\) real) is
Hence
Introduce
so that \(\Delta = 2\lambda_0 Z_1 + d^2 - 1\).
The incircle radius is \(r = 1-d\). Notice that
Thus
Two circles with centres \(c,d\) and radii \(R,r\) are tangent exactly when
Using (13) and (11) this becomes
Expanding and cancelling the common term \(r^2\) yields
Since \(\lambda_0 \neq 0\) we may divide by \(\lambda_0\):
The problem is now reduced to verifying the identity (14) for the quantities defined above.
6. Algebraic reduction using \(S\) and \(T\).
Write \(s = \sin\alpha,\; c = \cos\alpha\). The angle \(\alpha\) satisfies \(0<\alpha<\frac{\pi}{2},\ \alpha\neq\frac{\pi}{3}\).
Recall that \(\theta\) is the free parameter and \(\delta = \theta-\alpha\). Then
From the linear system
we solve for \(\cos\theta,\sin\theta\) (the determinant is \(-\sin3\alpha\neq0\)) and then obtain
From these we compute
Squaring and adding the expressions for \(\cos\theta\) and \(\sin\theta\) gives the relation
Set
From (17),
where \(A = \sin3\alpha,\; B = 2\cos3\alpha\).
The quantity \(W\) rewrites as
Because \(\cos\alpha-\cos3\alpha = 2\sin2\alpha\sin\alpha\), we have
7. Introducing convenient constants.
Let
Also set
Recall \(K = \cos2\alpha+\frac12 = \frac{4c^2-1}{2} = \frac{K_0}{2}\); hence \(\lambda_0 = \frac{K}{2s} = \frac{K_0}{4s}\).
Now write \(U, M, Z_1\) in the form (constant) + (coefficient)\, \(Q\). From (15)–(16) and \(\sin3\alpha = sK_0\),
Then
Using (18) we obtain
Finally \(W = \frac{H_1}{P^2} + \frac{H_2}{P}\) with \(H_1 = A^2 = s^2K_0^2,\; H_2 = C = 8s^2c\).
8. Computing the constants.
First,
Observe the useful identity
Also \(B = 2\cos3\alpha = 2c(4c^2-3)\).
Now
because \(r = \frac{(1+2c)t}{2}\).
Next,
Using (21) to replace the bracket,
Put \(t = \frac{1}{1+c}\) and combine the terms over the common denominator \((1+c)\):
The bracket becomes
Expanding the numerator:
Factorisation: \(4c^4 - 5c^2 + 1 = (4c^2-1)(c^2-1) = K_0(-s^2) = -s^2K_0\).
Thus \(N = -2s^2K_0\), and the bracket equals \(\frac{-2s^2K_0}{1+c} = -2s^2K_0 t\).
Finally
The constants for \(U\) are simpler:
Summarising,
9. Verifying the identity (14).
Substitute the above expressions into (14) and multiply by \(P^2\). The difference LHS – RHS becomes a polynomial in \(P\):
We prove that each coefficient is zero.
Constant term.
so the constant term vanishes.
Coefficient of \(P^2\).
Using \(\lambda_0 = \frac{K_0}{4s}\) and \(r = \frac{(1+2c)t}{2}\),
Hence
Now \((1+2c)^2 = 1 + 4c + 4c^2\), while \(K_0 + 2 + 4c = (4c^2-1) + 2 + 4c = 4c^2 + 4c + 1 = (1+2c)^2\).
Thus the coefficient is zero.
Coefficient of \(P\).
Compute the left part first:
We have \(F_2' = -sK_0 r\), and
so
Since \(K_0 = 4c^2-1\), \(K_0 + 1 + 2c = 4c^2 + 2c = 2c(1+2c)\). Hence
Therefore
Now the right part:
Both sides coincide, so the coefficient of \(P\) is also zero.
Since all three coefficients vanish, the polynomial is identically zero and equation (14) holds for our \(P = ST\).
10. Conclusion.
We have proved \((\Delta - r^2)^2 = 4r^2 R^2\), which is exactly the condition \(|c-d| = R \pm r\). Hence the circumcircle of \(AYZ\) and the incircle of \(\mathcal{R}\) are tangent (externally if the plus sign holds, internally if the minus sign holds; in either case they are tangent). \(\blacksquare\)
USAMO 2026 P4
Problem
A positive integer \(n\) is called solitary if, for any nonnegative integers \(a\) and \(b\) such that \(a + b = n\), either \(a\) or \(b\) contains the digit "1". Determine, with proof, the number of solitary integers less than \(10^{2026}\).
1. Summary
a. Verdict: I have successfully solved the problem. The final answer is \(2^{2026} - 1\).
b. Method Sketch:
Let \(S\) be the set of nonnegative integers whose decimal representation contains no digit \(1\). A positive integer \(n\) is solitary iff \(n\notin S+S\).
Fix the length \(L=2026\) and represent all numbers \(<10^{L}\) as \(L\)-digit strings (least significant digit first). Adding two numbers from \(S\) digitwise with carries \(c_i\in\{0,1\}\) yields a per‑digit condition: for incoming carry \(c\), sum digit \(d\), and outgoing carry \(c'\), the quantity \(d+10c'-c\) must be a sum of two digits from \(D=\{0,2,3,\dots,9\}\). The set of possible sums is \(T=\{0,2,3,\dots,18\}\setminus\{1\}\).
Define \(U(c,d)=\{c'\in\{0,1\}:d+10c'-c\in T\}\) and compute it explicitly; a key property is \(U(0,d)\cup U(1,d)=\{0,1\}\) for every \(d\).
Process the digits of \(n\) from least to most significant, maintaining the set \(P_i\) of possible carries after \(i\) digits: \(P_0=\{0\}\), \(P_{i+1}=\bigcup_{c\in P_i}U(c,n_i)\). Then \(n\in S+S\) iff \(0\in P_L\).
Because of the union property, once \(P_i=\{0,1\}\) it stays \(\{0,1\}\). Hence for \(n\) to be solitary we must avoid \(\{0,1\}\) and end with \(P_L=\{1\}\). Inspecting the table shows that while in state \(\{0\}\) only the digit \(9\) keeps the state \(\{0\}\), the digit \(1\) moves it to \(\{1\}\), and any other digit forces \(\{0,1\}\); while in state \(\{1\}\), only \(0\) and \(2\) keep it \(\{1\}\), all others force \(\{0,1\}\).
Thus an \(L\)-digit string is solitary iff it consists of a (possibly empty) block of \(9\)'s at the least significant positions, followed by exactly one \(1\), followed by only \(0\)'s and \(2\)'s.
Counting such strings gives \(\sum_{k=0}^{L-1}2^{L-1-k}=2^{L}-1\). The all‑zero string (\(n=0\)) is excluded, so all counted strings correspond to positive integers. For \(L=2026\) the answer is \(2^{2026}-1\).
2. Detailed Solution
1. Reformulation.
Let
(For \(x=0\) the representation is “\(0\)”, which is in \(D\), so \(0\in S\).)
A positive integer \(n\) is solitary iff there is no pair \(a,b\in S\) with \(a+b=n\). Hence
2. Fixed‑length representation.
Set \(L = 2026\). Every integer \(0\le n < 10^{L}\) can be written uniquely as
We call \((n_0,n_1,\dots,n_{L-1})\) the \(L\)-digit string of \(n\) (the units digit \(n_0\) comes first). The map \(n\mapsto (n_0,\dots,n_{L-1})\) is a bijection from \(\{0,1,\dots,10^{L}-1\}\) onto \(\{0,\dots,9\}^{L}\).
If \(a,b\in S\) and \(a,b<10^{L}\), we also write them as \(L\)-digit strings; their digits belong to \(D\) (padding with leading zeros does not introduce the digit \(1\)).
3. Addition with carries.
Assume \(a,b\in S\) and \(a+b=n\) with \(a,b<10^{L}\). Perform the addition digitwise; let \(c_i\in\{0,1\}\) be the carry into position \(i\), with \(c_0=0\). Then for each \(i=0,\dots,L-1\),
Because \(a+b<10^{L}\), the final carry must be \(c_L=0\). (The carries stay in \(\{0,1\}\) since \(a_i+b_i+c_i\le 9+9+1=19\).)
Conversely, if we can find digits \(a_i,b_i\in D\) and carries \(c_i\in\{0,1\}\) satisfying (2) with \(c_0=c_L=0\), then \(a=\sum a_i10^{i}\), \(b=\sum b_i10^{i}\) belong to \(S\) and \(a+b=n\).
Thus, for \(n<10^{L}\),
4. Per‑digit condition.
Fix a position \(i\). Suppose the incoming carry is \(c\in\{0,1\}\), the required sum digit is \(d=n_i\), and the outgoing carry is \(c'\in\{0,1\}\). From (2) we need
The right‑hand side must belong to the set of all possible sums of two elements of \(D\):
Since \(D\) contains every decimal digit except \(1\),
i.e. every integer from \(0\) to \(18\) except \(1\). Hence \(c'\) is admissible exactly when
Define for \(c\in\{0,1\}\) and \(d\in\{0,\dots,9\}\)
A direct inspection yields the following table:
Justification. For \(c=0\): \(c'=0\) gives \(d\in\Sigma\iff d\neq1\); \(c'=1\) gives \(d+10\in\Sigma\iff d\le8\iff d\neq9\). For \(c=1\): \(c'=0\) gives \(d-1\in\Sigma\iff d-1\ge0\) and \(d-1\neq1\iff d\in\{1,3,4,5,6,7,8,9\}\); \(c'=1\) gives \(d+9\in\Sigma\), which holds for all \(d\) (since \(9,\dots,18\in\Sigma\)).
A crucial observation is that for every digit \(d\),
(Indeed: \(d=0\Rightarrow\{0,1\}\cup\{1\}=\{0,1\}\); \(d=1\Rightarrow\{1\}\cup\{0,1\}=\{0,1\}\); \(d=2\Rightarrow\{0,1\}\cup\{1\}=\{0,1\}\); \(d=3,\dots,8\Rightarrow\{0,1\}\cup\{0,1\}=\{0,1\}\); \(d=9\Rightarrow\{0\}\cup\{0,1\}=\{0,1\}\).)
5. Propagating possible carries.
Process the digits \(n_0,n_1,\dots,n_{L-1}\) from least to most significant. Define a sequence of sets \(P_0,P_1,\dots,P_L\subseteq\{0,1\}\) by
We claim that for each \(i\), \(P_i\) is exactly the set of all possible values of the carry \(c_i\) in a valid addition for the prefix \(n_0\dots n_{i-1}\).
Proof by induction.
- \(i=0\): The initial carry is forced to be \(0\), so \(P_0=\{0\}\) is correct.
- Assume the statement holds for some \(i\). Let \(c\in P_i\); by hypothesis there exists a valid addition for the prefix ending with carry \(c_i=c\). To continue at position \(i\), we need a carry \(c_{i+1}=c'\) such that (4) holds for \(d=n_i\). The admissible \(c'\) are precisely \(U(c,n_i)\). Conversely, for any \(c'\in U(c,n_i)\) we can choose digits \(a_i,b_i\in D\) with \(a_i+b_i=d+10c'-c\) (possible because the sum lies in \(\Sigma\)) and extend the valid addition. Hence the set of possible \(c_{i+1}\) is exactly \(\bigcup_{c\in P_i}U(c,n_i)=P_{i+1}\). This completes the induction.
Consequently, \(P_L\) is the set of all possible final carries \(c_L\). From (3) we obtain
Therefore, a positive integer \(n<10^{L}\) is solitary exactly when \(0\notin P_L\).
6. Behaviour of the sets \(P_i\).
From (5) we immediately get a “memoryless” property:
Indeed, if \(P_i=\{0,1\}\) then \(P_{i+1}=U(0,n_i)\cup U(1,n_i)=\{0,1\}\), and the same argument repeats.
For \(n\) to be solitary we must have \(0\notin P_L\). Hence we must avoid ever reaching the set \(\{0,1\}\) (otherwise (7) forces \(0\in P_L\)). Therefore every \(P_i\) must be a singleton, i.e. \(\{0\}\) or \(\{1\}\). Since \(P_0=\{0\}\) and we must end with \(0\notin P_L\), the table above shows that the only possible pattern is a (possibly empty) block of \(\{0\}\)'s followed by a \(\{1\}\) (which then persists until the end). In other words, the sequence of states must switch from \(\{0\}\) to \(\{1\}\) exactly once, and never return.
7. Digits that preserve the singleton property.
We examine which digits \(n_i\) allow the transition while keeping the state a singleton.
- While the current state is \(P_i = \{0\}\):
- If \(n_i = 9\), then \(U(0,9)=\{0\}\) \(\Rightarrow P_{i+1}=\{0\}\).
- If \(n_i = 1\), then \(U(0,1)=\{1\}\) \(\Rightarrow P_{i+1}=\{1\}\).
- For every other digit (\(0,2,3,4,5,6,7,8\)), \(U(0,d)=\{0,1\}\) \(\Rightarrow P_{i+1}=\{0,1\}\) (destroying the singleton property).
- While the current state is \(P_i = \{1\}\):
- If \(n_i = 0\), then \(U(1,0)=\{1\}\) \(\Rightarrow P_{i+1}=\{1\}\).
- If \(n_i = 2\), then \(U(1,2)=\{1\}\) \(\Rightarrow P_{i+1}=\{1\}\).
- For every other digit (\(1,3,4,5,6,7,8,9\)), \(U(1,d)=\{0,1\}\) \(\Rightarrow P_{i+1}=\{0,1\}\) (destroying the singleton property).
Therefore, to stay inside singletons and eventually reach \(\{1\}\), the digits \(n_0,n_1,\dots,n_{L-1}\) must obey the following rules:
- The first \(k\) digits (for some \(k\ge0\)) can only be \(9\); each \(9\) keeps the state in \(\{0\}\).
- The \((k+1)\)-th digit must be exactly one \(1\); this changes the state to \(\{1\}\).
- All subsequent digits (if any) must be only \(0\) or \(2\); these keep the state in \(\{1\}\).
No other digit is allowed, and a second \(1\) cannot appear (it would force \(\{0,1\}\) while in state \(\{1\}\)).
8. Characterisation of solitary strings.
An \(L\)-digit string \((n_0,\dots,n_{L-1})\) corresponds to a solitary number iff there exists an integer \(k\) with \(0\le k\le L-1\) such that
(When \(k=0\) there are no \(9\)'s; when \(k=L-1\) the block of \(0\)'s and \(2\)'s is empty.)
Sufficiency. If (8) holds, then by induction \(P_0=\dots=P_k=\{0\}\) (each \(9\) keeps \(\{0\}\)), \(P_{k+1}=U(0,1)=\{1\}\), and for \(i>k+1\) we have \(n_{i-1}\in\{0,2\}\) so \(P_i=U(1,n_{i-1})=\{1\}\). Thus \(P_L=\{1\}\), \(0\notin P_L\), and \(n\) is solitary.
Necessity. If \(n\) is solitary, the previous section shows that the state sequence must follow the pattern \(\{0\}\dots\{0\}\to\{1\}\dots\{1\}\), which forces the digits to satisfy (8).
9. Counting.
For a fixed \(k\) (\(0\le k\le L-1\)), the digits \(n_0,\dots,n_{k-1}\) are forced to be \(9\), \(n_k\) is forced to be \(1\), and each of the remaining \(L-1-k\) digits \(n_{k+1},\dots,n_{L-1}\) can be chosen independently from \(\{0,2\}\). Hence there are \(2^{L-1-k}\) such strings. Summing over all possible positions \(k\) gives the total number of \(L\)-digit strings of the form (8):
10. Returning to integers.
The map \((n_0,\dots,n_{L-1})\mapsto \sum_{i=0}^{L-1} n_i10^{\,i}\) is a bijection between the set of \(L\)-digit strings and the integers \(0,1,\dots,10^{L}-1\). The all‑zero string (\(n=0\)) does not satisfy (8) because it lacks the required digit \(1\); it corresponds to the non‑solitary number \(0\). Every other counted string contains at least one digit \(1\), hence represents a positive integer strictly smaller than \(10^{L}\). Since the mapping is bijective, the number of solitary positive integers less than \(10^{L}\) is exactly the number of counted strings.
11. Final answer.
Substituting \(L=2026\) yields
USAMO 2026 P5
Problem
Let \(ABC\) be a triangle. Points \(D\), \(E\), and \(F\) lie on sides \(BC\), \(CA\), and \(AB\), respectively, such that
Let \(O_A\), \(O_B\), and \(O_C\) be the circumcenters of triangles \(AFE\), \(BDF\), and \(CED\), respectively. Let \(M\), \(N\), and \(O\) be the circumcenters of triangles \(ABC\), \(DEF\), and \(O_A O_B O_C\), respectively. Prove that \(OM = ON\).
1. Summary
a. Verdict: I have found a complete solution. The equality \(OM = ON\) holds for every triangle \(ABC\) and points \(D,E,F\) on its sides satisfying \(\angle AFE = \angle BDF = \angle CED\).
b. Method Sketch:
- An angle chase shows that \(\triangle DEF\) has angles \(\alpha,\beta,\gamma\) at \(E,F,D\) respectively, where \(\alpha,\beta,\gamma\) are the angles of \(\triangle ABC\). Together with the cyclic order of the points on the sides, this proves \(\triangle DEF\) is directly similar to \(\triangle ABC\) with \(A\mapsto E,\; B\mapsto F,\; C\mapsto D\).
- Hence there is a unique direct spiral similarity \(\mathcal S\) sending \(ABC\) to \(DEF\); let its centre be \(X\) and complex ratio \(k\) (necessarily non‑real). Using directed angles modulo \(180^\circ\) we prove that \(X\) lies on the three circumcircles \((AFE), (BDF), (CED)\); thus \(X\) is the Miquel point.
- Translating so that \(X=0\), we have \(e = k a,\; f = k b,\; d = k c\). A standard complex formula gives the circumcenters \(O_A,O_B,O_C\) of \(\triangle AFE,\triangle BDF,\triangle CED\) as \(o_A = \lambda a,\; o_B = \lambda b,\; o_C = \lambda c\) with \(\lambda = \frac{k(1-\bar k)}{k-\bar k}\).
- The circumcenters \(M,N,O\) of \(\triangle ABC,\triangle DEF,\triangle O_A O_B O_C\) then satisfy \(m\), \(n = k m\), \(o = \lambda m\).
- Distances become \(OM = |m|\,|\lambda-1|\) and \(ON = |m|\,|\lambda-k|\). An algebraic manipulation shows \(|\lambda-1| = |\lambda-k|\) for every non‑real \(k\), so \(OM = ON\). Translation invariance returns the equality to the original configuration.
2. Detailed Solution
1. Angles of \(\triangle DEF\).
Let \(\angle A = \alpha\), \(\angle B = \beta\), \(\angle C = \gamma\) and put \(\theta = \angle AFE = \angle BDF = \angle CED\).
Because \(F\) lies on side \(AB\), the rays \(FA\) and \(FB\) are opposite. Points \(D\) and \(E\) lie on the same side of line \(AB\) as \(C\); therefore on that side the three angles around \(F\) sum to \(180^\circ\):
In \(\triangle BDF\) we have \(\angle DBF = \beta\) (since \(D\in BC,\; F\in AB\)) and \(\angle BDF = \theta\); hence
Substituting \(\angle AFE = \theta\) and this into (1) gives
Repeating the argument at \(E\) (using line \(AC\)) and at \(D\) (using line \(BC\)) yields
Thus \(\triangle DEF\) has angles \(\alpha\) at \(E\), \(\beta\) at \(F\), \(\gamma\) at \(D\).
2. Direct similarity.
Assume the vertices of \(\triangle ABC\) are listed counter‑clockwise (otherwise reflect the plane). The points on the sides appear in the order \(F\in AB,\; D\in BC,\; E\in CA\); traversing the perimeter counter‑clockwise we meet \(F, D, E\). Consequently the vertices of \(\triangle DEF\) in counter‑clockwise order are \(F, D, E\). (A quick check: writing \(F = a+u(b-a),\; D = b+w(c-b),\; E = c+v(a-c)\) with \(0<u,v,w<1\) gives the signed area \([F,D,E] = [A,B,C]\big((1-u)(1-v)(1-w)+uvw\big)>0\).)
Together with the angle correspondence above this shows that \(\triangle DEF\) is directly similar to \(\triangle ABC\) with the mapping
3. Spiral similarity.
Because the two triangles are directly similar, there exists a unique direct spiral similarity \(\mathcal S\) sending \(ABC\) onto \(DEF\). Write it as
where \(X\) is the centre and \(k\in\mathbb C\) is the complex ratio. From the correspondence,
If \(k\) were real, \(\mathcal S\) would be a homothety (possibly with a half‑turn); corresponding sides would be parallel. In particular \(AB\parallel EF\), forcing \(\angle AFE\) to be \(0^\circ\) or \(180^\circ\), contradicting that it is a proper angle. Hence \(k\notin\mathbb R\); in particular \(k\neq\bar k\) and \(k\neq 1\).
4. \(X\) is the Miquel point.
We use directed angles modulo \(180^\circ\), denoted by \(\measuredangle\). For lines \(\ell_1,\ell_2\), \(\measuredangle(\ell_1,\ell_2)\) is the rotation from \(\ell_1\) to \(\ell_2\) modulo \(180^\circ\); for points, \(\measuredangle(PQR)=\measuredangle(QP,QR)\). The directed inscribed angle theorem states that four points \(A,B,C,D\) are concyclic or collinear iff \(\measuredangle(ABC)=\measuredangle(ADC)\).
From (2) we have \(\mathcal S(P)-\mathcal S(Q)=k(P-Q)\); therefore the directed angle between a segment and its image is \(\arg k\) modulo \(180^\circ\):
Circle \((AFE)\): \(F\in AB\) implies line \(FA = AB\), and line \(FE = EF\). Hence
From \(E-X = k(A-X)\) we obtain \(\measuredangle(XA,XE)=\arg k\), i.e. \(\measuredangle(AXE)=\arg k\). Thus
By the directed inscribed angle theorem, \(A,F,E,X\) are concyclic. So \(X\in (AFE)\).
Circle \((BDF)\): \(D\in BC\) gives line \(DB = BC\) and line \(DF = FD\). Hence
From \(F-X = k(B-X)\) we get \(\measuredangle(BXF)=\arg k\). Thus \(\measuredangle(BDF)=\measuredangle(BXF)\) and \(X\in (BDF)\).
Circle \((CED)\): \(E\in CA\) gives line \(EC = CA\) and line \(ED = DE\). Hence
From \(D-X = k(C-X)\) we get \(\measuredangle(CXD)=\arg k\). Thus \(\measuredangle(CED)=\measuredangle(CXD)\) and \(X\in (CED)\).
Therefore \(X\) lies on all three circumcircles; it is exactly the Miquel point of the inscribed triangle \(DEF\).
5. Circumcentres of the small triangles.
Since \(X\) belongs to \((AFE)\), the circumcircle of \(\triangle AFE\) is exactly the circumcircle of \(\triangle AEX\). Consequently the circumcenter \(O_A\) of \(\triangle AFE\) coincides with the circumcenter of \(\triangle AEX\). Analogously,
6. Complex computation with \(X\) as origin.
Translate the whole plane so that the Miquel point \(X\) becomes the origin \(0\). From now on we denote the complex coordinate of a point by the corresponding lower‑case letter. Then \(x=0\) and (2) simplifies to
For any three non‑collinear points \(0,z,w\) the circumcenter \(u\) is given by the formula
which follows from solving the system \(|u|=|u-z|=|u-w|\).
Apply (5) to \(\triangle AEX\) with vertices \(0,a,ka\):
Define
Then \(o_A = \lambda a\). Exactly the same computation gives
Thus \(\triangle O_A O_B O_C\) is the image of \(\triangle ABC\) under multiplication by \(\lambda\) (a spiral similarity about the origin).
7. The three circumcentres \(M,N,O\).
Let \(m,n,o\) be the coordinates of the circumcentres of \(\triangle ABC\), \(\triangle DEF\) and \(\triangle O_A O_B O_C\) respectively.
- By (4), \(\triangle DEF\) is the image of \(\triangle ABC\) under multiplication by \(k\). A similarity about the origin sends the circumcenter to the circumcenter, hence \(n = k m\).
- From \(o_A=\lambda a\) etc., \(\triangle O_A O_B O_C\) is the image of \(\triangle ABC\) under multiplication by \(\lambda\), hence \(o = \lambda m\).
8. An algebraic identity.
From (6),
Taking absolute values and using \(|\bar k|=|k|\),
Hence \(|\lambda-1| = |\lambda-k|\).
9. Conclusion.
Now compute the distances in the translated plane:
Since \(|\lambda-1| = |\lambda-k|\), we obtain \(OM = ON\).
Distances are invariant under translation, so the equality holds in the original configuration. \(\quad\blacksquare\)
USAMO 2026 P6
Problem
Let \(a\) and \(b\) be positive integers such that \(\varphi(ab+1)\) divides \(a^2 + b^2 + 1\). Prove that \(a\) and \(b\) are Fibonacci numbers.
Summary
a. Verdict: I have successfully solved the problem. The final answer is that any positive integers \(a,b\) satisfying \(\varphi(ab+1)\mid a^2+b^2+1\) must be Fibonacci numbers (with the standard convention \(F_1=F_2=1\)).
b. Method Sketch:
- Parity arguments first handle the trivial case \((a,b)=(1,1)\) and show that any other solution has opposite parity; then \(n=ab+1\) is odd and \(v_2(a^2+b^2+1)=1\), forcing \(\varphi(n)\equiv2\pmod4\). A standard lemma yields \(n=p^e\) with a prime \(p\equiv3\pmod4\).
- If \(e=1\) (\(n\) prime), then \(ab=p-1\) and the divisibility condition becomes \(a^2+b^2+1=kab\). Vieta jumping (choosing a solution with minimal sum) proves \(k=3\), so \(a^2+b^2+1=3ab\). A descent shows that all positive solutions of this equation are generated from \((1,1)\) by \((u,v)\mapsto(v,3v-u)\). The resulting sequence satisfies \(x_{n+2}=3x_{n+1}-x_n\) with \(x_1=x_2=1\), and an induction using a Fibonacci identity gives \(x_n=F_{2n-3}\) (and \(x_1=F_1,x_2=F_2\)). Hence \(a,b\) are Fibonacci.
- If \(e\ge2\), then \(p\mid\varphi(n)\mid S\), so \(p\mid a^2+b^2+1\). Together with \(ab=p^e-1\equiv-1\pmod p\) one obtains \(a^4+a^2+1\equiv0\pmod p\). Analysing this congruence forces \(p=3\). Then \(n=3^e\). A modulo \(9\) argument shows \(e\le2\), so \(e=2\), \(n=9\), \(ab=8\). Parity eliminates the even pair \((2,4)\), leaving only \((1,8)\) and \((8,1)\), both of which are Fibonacci.
- Every possibility is covered, so \(a\) and \(b\) are always Fibonacci numbers.
Detailed Solution
Let \(a,b\) be positive integers such that \(\varphi(ab+1)\mid a^2+b^2+1\). Set \(S=a^2+b^2+1\) and \(n=ab+1\).
1. Parity and the trivial case.
If \(a,b\) are both odd, then \(a^2\equiv b^2\equiv1\pmod4\), so \(S\equiv3\pmod4\) is odd. Since \(\varphi(n)\mid S\), \(\varphi(n)\) must be odd. The only positive integers with an odd totient are \(1\) and \(2\). \(n=1\) is impossible, hence \(n=2\), giving \(ab=1\) and \(a=b=1\). Both are Fibonacci numbers (\(F_1=F_2=1\)).
If \(a,b\) are both even, then \(a^2\equiv b^2\equiv0\pmod4\), so \(S\equiv1\pmod4\) is again odd, forcing \(\varphi(n)\) odd. Thus \(n\in\{1,2\}\); \(n=1\) is impossible and \(n=2\) gives \(ab=1\), contradicting evenness.
Consequently any further solution has \(a,b\) of opposite parity. Then one is even, one odd, so \(ab\) is even and \(n=ab+1\) is odd. Moreover \(a^2\equiv0\) or \(1\pmod4\), giving \(a^2+b^2\equiv1\pmod4\) and \(S\equiv2\pmod4\); hence \(v_2(S)=1\).
2. The structure of \(n\).
Because \(n>1\) is odd, \(\varphi(n)\) is even. From \(\varphi(n)\mid S\) and \(v_2(S)=1\) we obtain \(v_2(\varphi(n))=1\).
Write \(n=\prod p_i^{e_i}\) with odd primes \(p_i\). Then
and since each \(p_i^{e_i-1}\) is odd,
For an odd prime \(p\), \(v_2(p-1)\ge1\). The sum can equal \(1\) only if there is exactly one prime factor and \(v_2(p_1-1)=1\), i.e. \(p_1\equiv3\pmod4\). Therefore
3. The case \(e=1\) (\(n\) prime).
Here \(n=p\), so \(\varphi(n)=p-1=ab\). The condition \(\varphi(n)\mid S\) becomes \(ab\mid S\). Hence there is an integer \(k\ge1\) such that
Consider all positive integer solutions \((x,y)\) of (3.1). The set is nonempty because \((a,b)\) belongs to it. Choose one with minimal sum \(x+y\); by symmetry we may assume \(x\le y\).
If \(x=y\), then \(2x^2+1=kx^2\), i.e. \((k-2)x^2=1\). Since \(x\ge1\), we must have \(x=1\) and \(k=3\).
If \(x<y\), treat (3.1) as a quadratic in \(y\):
The other root is
Because the coefficients are integers and \(y\) is an integer root, \(y'\) is an integer; the product \(x^2+1>0\) gives \(y'>0\). From \(x\le y-1\) we obtain
hence \(y' = (x^2+1)/y < y\). Thus \((x,y')\) is another solution of (3.1) with sum \(x+y' < x+y\), contradicting the minimality of \((x,y)\).
Therefore the minimal solution must have \(x=y\), forcing \(k=3\) and \((x,y)=(1,1)\). In particular, the original pair satisfies
Now we describe all positive solutions of (3.2). Let \((a,b)\) be a solution with \(a\le b\). If \(a=b\), then \(2a^2+1=3a^2\Rightarrow a^2=1\Rightarrow a=1\). If \(a<b\), view (3.2) as a quadratic in \(b\):
The other root is
Because \(a<b\), we have \(a^2+1 < b^2\) (as above), so \(b' < b\), and \(b'\) is a positive integer. Hence \((a,b')\) is another solution with a smaller sum. Repeating this descent, we must eventually reach a solution with \(a=b\), which is \((1,1)\). Thus every solution of (3.2) reduces to \((1,1)\).
Reversing the process, all solutions are generated from \((1,1)\) by the transformation \((u,v)\mapsto (v,3v-u)\) (with \(u\le v\)). Starting from \((1,1)\) we obtain the infinite chain
Define a sequence \((x_n)_{n\ge1}\) by
Then the pairs appearing are exactly the consecutive pairs \((x_n,x_{n+1})\).
Let \((F_n)\) be the Fibonacci numbers: \(F_1=F_2=1\), \(F_{n+2}=F_{n+1}+F_n\). We prove that \(x_n = F_{2n-3}\) for all \(n\ge3\).
- \(n=3\): \(x_3 = 3\cdot1-1 = 2 = F_3\).
- \(n=4\): \(x_4 = 3\cdot2-1 = 5 = F_5\).
- Inductive step: assume the formula holds for \(n\) and \(n+1\) with \(n\ge3\). Then
We use the Fibonacci identity
which follows from
Substituting gives \(F_{2n+1} = 3F_{2n-1} - F_{2n-3}\). Hence
completing the induction. For \(n=1,2\) we have \(x_1=1=F_1\), \(x_2=1=F_2\). Therefore every \(x_n\) is a Fibonacci number. Since \((a,b)\) is one of the pairs \((x_n,x_{n+1})\), both \(a\) and \(b\) are Fibonacci numbers.
4. The case \(e\ge2\).
Now \(n=p^e\) with \(e\ge2\), \(p\equiv3\pmod4\). Then \(\varphi(n)=p^{e-1}(p-1)\). Because \(e\ge2\), \(p\mid\varphi(n)\), and from \(\varphi(n)\mid S\) we obtain
Moreover
From (4.2), \(p\nmid a\) (otherwise \(ab\equiv0\pmod p\)). Hence \(a\) is invertible modulo \(p\), and (4.2) gives \(b\equiv -a^{-1}\pmod p\). Substituting into (4.1):
We distinguish two subcases.
Subcase 1: \(a^2\equiv 1 \pmod p\). Then (4.3) yields \(3\equiv 0\pmod p\), so \(p=3\).
Subcase 2: \(a^2\not\equiv 1 \pmod p\). Then \(a^2-1\) is invertible modulo \(p\). Multiplying (4.3) by \(a^2-1\) gives
so the order of \(a\) modulo \(p\) divides \(6\). Since \(a^2\not\equiv1\), the order is not \(1\) or \(2\); it must be \(3\) or \(6\). By Fermat's little theorem the order divides \(p-1\), hence \(3\mid p-1\), i.e. \(p\equiv1\pmod3\).
If \(p\equiv1\pmod3\), then \(p-1\) is a multiple of \(3\), so \(\varphi(n)=p^{e-1}(p-1)\) is divisible by \(3\). Because \(\varphi(n)\mid S\), we get \(3\mid S\). On the other hand, \(ab = p^e-1 \equiv 0 \pmod3\) (since \(p\equiv1\pmod3\)), so at least one of \(a,b\) is a multiple of \(3\). Then \(S = a^2+b^2+1\) is congruent to \(2\) or \(1\) modulo \(3\), contradicting \(3\mid S\). Thus Subcase 2 is impossible.
Therefore we must have \(p=3\). Consequently \(n=3^e\) with \(e\ge2\), and \(\varphi(n)=2\cdot3^{e-1}\).
Now we show \(e\le2\). Suppose \(e\ge3\). Then \(9\mid\varphi(n)\), so \(9\mid S\). Also \(ab = 3^e-1 \equiv -1 \equiv 8 \pmod9\). Hence neither \(a\) nor \(b\) is divisible by \(3\) (otherwise \(ab\equiv0\pmod3\), contradicting \(8\equiv2\pmod3\)). Thus \(a,b\) are congruent to \(1,2,4,5,7,8\) modulo \(9\). Their squares modulo \(9\) are \(1,4,7\). We need \(a^2+b^2+1\equiv0\pmod9\), i.e. \(a^2+b^2\equiv8\pmod9\). Moreover \(ab\equiv8\pmod9\). Checking all unordered pairs \(\{u,v\}\) from \(\{1,2,4,5,7,8\}\) with \(uv\equiv8\pmod9\) (the possibilities are \(\{1,8\},\{2,4\},\{5,7\}\)), we compute
In every case \(S\equiv3\pmod9\), contradicting \(9\mid S\). Hence \(e\le2\).
Since \(e\ge2\), we must have \(e=2\). Thus \(n=9\), \(\varphi(9)=6\), and \(ab=8\). The positive integer pairs with product \(8\) are \((1,8)\) and \((2,4)\). From §1, any solution other than \((1,1)\) consists of numbers of opposite parity; the pair \((2,4)\) has both even, so it cannot satisfy the original condition. Therefore the only possibilities are \((a,b)=(1,8)\) and \((8,1)\). Both \(1\) and \(8\) are Fibonacci numbers (\(F_1=1\), \(F_6=8\)). (Indeed, \(\varphi(9)=6\) divides \(1^2+8^2+1=66\), so they are genuine solutions.)
5. Conclusion.
We have exhausted all possibilities:
- \((a,b)=(1,1)\);
- \(n=p^e\) with \(e=1\) (\(n\) prime);
- \(n=3^e\) with \(e=2\).
@misc{unipat2026unimath,
title = {UniMath: From Proof-Synthesis Data to Test-Time Self-Evolution},
author = {UniPat AI},
year = {2026},
url = {https://unipat.ai/blog/UniMath},
}