add USAJMO 2025
Browse files
USAJMO/download_script/download.py
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -----------------------------------------------------------------------------
|
| 2 |
+
# Author: Jiawei Liu
|
| 3 |
+
# Date: 2025-10-29
|
| 4 |
+
# -----------------------------------------------------------------------------
|
| 5 |
+
'''
|
| 6 |
+
Download script for APMO
|
| 7 |
+
To run:
|
| 8 |
+
`python USAJMO/download_script/download.py`
|
| 9 |
+
'''
|
| 10 |
+
|
| 11 |
+
import re
|
| 12 |
+
import requests
|
| 13 |
+
from bs4 import BeautifulSoup
|
| 14 |
+
from tqdm import tqdm
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
from requests.adapters import HTTPAdapter
|
| 17 |
+
from urllib3.util.retry import Retry
|
| 18 |
+
from urllib.parse import urljoin
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def build_session(
|
| 22 |
+
max_retries: int = 3,
|
| 23 |
+
backoff_factor: int = 2,
|
| 24 |
+
session: requests.Session = None
|
| 25 |
+
) -> requests.Session:
|
| 26 |
+
"""
|
| 27 |
+
Build a requests session with retries
|
| 28 |
+
|
| 29 |
+
Args:
|
| 30 |
+
max_retries (int, optional): Number of retries. Defaults to 3.
|
| 31 |
+
backoff_factor (int, optional): Backoff factor. Defaults to 2.
|
| 32 |
+
session (requests.Session, optional): Session object. Defaults to None.
|
| 33 |
+
"""
|
| 34 |
+
session = session or requests.Session()
|
| 35 |
+
adapter = HTTPAdapter(max_retries=Retry(total=max_retries, backoff_factor=backoff_factor))
|
| 36 |
+
session.mount("http://", adapter)
|
| 37 |
+
session.mount("https://", adapter)
|
| 38 |
+
session.headers.update({
|
| 39 |
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
|
| 40 |
+
})
|
| 41 |
+
|
| 42 |
+
return session
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def main():
|
| 46 |
+
base_url = "https://web.evanchen.cc/problems.html"
|
| 47 |
+
req_session = build_session()
|
| 48 |
+
|
| 49 |
+
output_dir = Path(__file__).parent.parent / "raw"
|
| 50 |
+
output_dir.mkdir(parents=True, exist_ok=True)
|
| 51 |
+
|
| 52 |
+
resp = req_session.get(base_url)
|
| 53 |
+
soup = BeautifulSoup(resp.text, 'html.parser')
|
| 54 |
+
|
| 55 |
+
imo_exams = soup.find_all("a", href=lambda h: h and re.search(r"JMO\-\d{4}\-notes.pdf$", h))
|
| 56 |
+
imo_pdf_links = [urljoin(base_url, link["href"]) for link in imo_exams]
|
| 57 |
+
|
| 58 |
+
for link in tqdm(imo_pdf_links):
|
| 59 |
+
output_file = output_dir / f"en-{Path(link).name}"
|
| 60 |
+
|
| 61 |
+
# Check if the file already exists
|
| 62 |
+
if output_file.exists():
|
| 63 |
+
continue
|
| 64 |
+
|
| 65 |
+
pdf_resp = req_session.get(link)
|
| 66 |
+
|
| 67 |
+
if pdf_resp.status_code != 200:
|
| 68 |
+
print(f"Failed to download {link}")
|
| 69 |
+
continue
|
| 70 |
+
|
| 71 |
+
output_file.write_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| 2 |
+
# JMO 2025 Solution Notes
|
| 3 |
+
|
| 4 |
+
Evan Chen 《陳誼廷》
|
| 5 |
+
|
| 6 |
+
29 September 2025
|
| 7 |
+
|
| 8 |
+
This is a compilation of solutions for the 2025 JMO. The ideas of the solution are a mix of my own work, the solutions provided by the competition organizers, and solutions found by the community. However, all the writing is maintained by me.
|
| 9 |
+
|
| 10 |
+
These notes will tend to be a bit more advanced and terse than the "official" solutions from the organizers. In particular, if a theorem or technique is not known to beginners but is still considered "standard", then I often prefer to use this theory anyways, rather than try to work around or conceal it. For example, in geometry problems I typically use directed angles without further comment, rather than awkwardly work around configuration issues. Similarly, sentences like "let \(\mathbb{R}\) denote the set of real numbers" are typically omitted entirely.
|
| 11 |
+
|
| 12 |
+
Corrections and comments are welcome!
|
| 13 |
+
|
| 14 |
+
## Contents
|
| 15 |
+
|
| 16 |
+
0 Problems 2
|
| 17 |
+
|
| 18 |
+
1 Solutions to Day 1 3
|
| 19 |
+
|
| 20 |
+
1.1 JMO 2025/1, proposed by John Berman 3
|
| 21 |
+
|
| 22 |
+
1.2 JMO 2025/2, proposed by John Berman 4
|
| 23 |
+
|
| 24 |
+
1.3 JMO 2025/3, proposed by Wilbert Chu 5
|
| 25 |
+
|
| 26 |
+
2 Solutions to Day 2 8
|
| 27 |
+
|
| 28 |
+
2.1 JMO 2025/4, proposed by Hung- Hsun Yu 8
|
| 29 |
+
|
| 30 |
+
2.2 JMO 2025/5, proposed by Carl Schildkraut 9
|
| 31 |
+
|
| 32 |
+
2.3 JMO 2025/6, proposed by Enrique Trevino 10
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## Problems
|
| 37 |
+
|
| 38 |
+
1. Prove that if \(f\colon \mathbb{Z}\to \mathbb{Z}\) is any function, then there are infinitely many integers \(c\) such that the function \(g(x) = f(x) + cx\) is not a bijection.
|
| 39 |
+
|
| 40 |
+
2. Fix positive integers \(k\) and \(d\) . Prove that for all sufficiently large odd positive integers \(n\) , the digits of the base- \(2n\) representation of \(n^k\) are all greater than \(d\) .
|
| 41 |
+
|
| 42 |
+
3. Let \(m\) and \(n\) be positive integers, and let \(\mathcal{R}\) be a \(2m\times 2n\) grid of unit squares. A domino is a \(1\times 2\) or \(2\times 1\) rectangle. An up-right path is a path from the lower-left corner of \(\mathcal{R}\) to the upper-right corner of \(\mathcal{R}\) formed by exactly \(2m + 2n\) edges of the grid squares.
|
| 43 |
+
|
| 44 |
+
In terms of \(m\) and \(n\) , find the number of up-right paths that divide \(\mathcal{R}\) into two subsets (possibly empty), each of which can be tiled with dominoes.
|
| 45 |
+
|
| 46 |
+
4. Let \(n\) be a positive integer, and let \(a_0 \geq a_1 \geq \dots \geq a_n \geq 0\) be integers. Prove that
|
| 47 |
+
|
| 48 |
+
\[\sum_{i = 0}^{n}i\binom{a_{i}}{2}\leq \frac{1}{2}\binom{a_{0} + a_{1} + \cdots + a_{n}}{2}.\]
|
| 49 |
+
|
| 50 |
+
5. Let \(H\) be the orthocenter of an acute triangle \(ABC\) , let \(F\) be the foot of the altitude from \(C\) to \(AB\) , and let \(P\) be the reflection of \(H\) across \(BC\) . Suppose that the circumcircle of triangle \(AFP\) intersects line \(BC\) at two distinct points \(X\) and \(Y\) . Prove that \(CX = CY\) .
|
| 51 |
+
|
| 52 |
+
6. Let \(S\) be a set of integers with the following properties:
|
| 53 |
+
|
| 54 |
+
\(\{1,2,\ldots ,2025\} \subseteq S.\) If \(a,b\in S\) and \(\gcd (a,b) = 1\) , then \(a b\in S\) If \(s + 1\) is composite for some \(s\in S\) , then all positive divisors of \(s + 1\) are in \(S\) Prove that \(S\) contains all positive integers.
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
## \(\S 1\) Solutions to Day 1
|
| 59 |
+
|
| 60 |
+
## \(\S 1.1\) JMO 2025/1, proposed by John Berman
|
| 61 |
+
|
| 62 |
+
Available online at https://aops.com/community/p34326771.
|
| 63 |
+
|
| 64 |
+
## Problem statement
|
| 65 |
+
|
| 66 |
+
Prove that if \(f\colon \mathbb{Z}\to \mathbb{Z}\) is any function, then there are infinitely many integers \(c\) such that the function \(g(x) = f(x) + cx\) is not a bijection.
|
| 67 |
+
|
| 68 |
+
Assume for contradiction that there exists a finite "bad" set \(S\) such that \(f(x) + cx\) is bijective for all \(c\notin S\)
|
| 69 |
+
|
| 70 |
+
The first observation is basically that given just \(f(0)\) and \(f(1)\) , or any two consecutive \(f\) - values, we can already find bad values of \(c\) .
|
| 71 |
+
|
| 72 |
+
Claim — The numbers \(f(0) - f(1)\) , \(f(1) - f(2)\) , \(f(2) - f(3)\) , ... are all in \(S\) . That is, consecutive differences of \(f\) only take finitely many values.
|
| 73 |
+
|
| 74 |
+
Proof. To see that \(f(0) - f(1)\in S\) , just note that
|
| 75 |
+
|
| 76 |
+
\[x\mapsto f(x) + (f(0) - f(1))\cdot x\]
|
| 77 |
+
|
| 78 |
+
is obviously not a bijective function, since it takes the same values at \(x = 0\) and \(x = 1\) , namely \(f(0)\) . The same is true for other elements. \(\square\)
|
| 79 |
+
|
| 80 |
+
In particular, suppose \(M > \max_{s\in S}|s|\) . Then the function
|
| 81 |
+
|
| 82 |
+
\[g(x) = f(x) + (M + 100)x\]
|
| 83 |
+
|
| 84 |
+
is supposed to be a bijection (because \(M + 100\notin S\) ), and yet \(g(x + 1) - g(x) > 100\) for all \(x\) , which is a contradiction.
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
## \(\S 1.2\) JMO 2025/2, proposed by John Berman
|
| 89 |
+
|
| 90 |
+
Available online at https://aops.com/community/p34326777.
|
| 91 |
+
|
| 92 |
+
## Problem statement
|
| 93 |
+
|
| 94 |
+
Fix positive integers \(k\) and \(d\) . Prove that for all sufficiently large odd positive integers \(n\) , the digits of the base- \(2n\) representation of \(n^k\) are all greater than \(d\) .
|
| 95 |
+
|
| 96 |
+
The problem actually doesn't have much to do with digits: the idea is to pick any length \(\ell \leq k\) , and look at the rightmost \(\ell\) digits of \(n^k\) ; that is, the remainder upon division by \((2n)^\ell\) . We compute it exactly:
|
| 97 |
+
|
| 98 |
+
Claim — Let \(n \geq 1\) be an odd integer, and \(k \geq \ell \geq 1\) integers. Then
|
| 99 |
+
|
| 100 |
+
\[n^k \bmod (2n)^i = c(k, \ell) \cdot n^i\]
|
| 101 |
+
|
| 102 |
+
for some odd integer \(1 \leq c(k, \ell) \leq 2^\ell - 1\) .
|
| 103 |
+
|
| 104 |
+
Proof. This follows directly by the Chinese remainder theorem, with \(c(k, \ell)\) being the residue class of \(n^{k-i} \pmod {2^\ell}\) (which makes sense because \(n\) was odd). \(\square\)
|
| 105 |
+
|
| 106 |
+
We can now stake the required threshold:
|
| 107 |
+
|
| 108 |
+
Claim — The problem statement holds once \(n \geq (d + 1) \cdot 2^{k- 1}\) .
|
| 109 |
+
|
| 110 |
+
Proof. Suppose \(n\) is that large. Then \(n^k\) has \(k\) digits in base- \(2n\) . Moreover, for each \(1 \leq \ell \leq k\) we have
|
| 111 |
+
|
| 112 |
+
\[c(k, \ell) \cdot n^\ell \geq (d + 1) \cdot (2n)^{\ell - 1}\]
|
| 113 |
+
|
| 114 |
+
because \(n\) is large enough; that implies the \(\ell^{\mathrm{th}}\) digit from the right is at least \(d + 1\) . Hence the problem is solved. \(\square\)
|
| 115 |
+
|
| 116 |
+
Remark. Note it doesn't really matter that \(c(k, i)\) is odd per se; we only need that \(c(k, i) \geq 1\) .
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
## \(\S 1.3\) JMO 2025/3, proposed by Wilbert Chu
|
| 121 |
+
|
| 122 |
+
Available online at https://aops.com/community/p34326818.
|
| 123 |
+
|
| 124 |
+
## Problem statement
|
| 125 |
+
|
| 126 |
+
Let \(m\) and \(n\) be positive integers, and let \(\mathcal{R}\) be a \(2m\times 2n\) grid of unit squares. A domino is a \(1\times 2\) or \(2\times 1\) rectangle. An up- right path is a path from the lower- left corner of \(\mathcal{R}\) to the upper- right corner of \(\mathcal{R}\) formed by exactly \(2m + 2n\) edges of the grid squares.
|
| 127 |
+
|
| 128 |
+
In terms of \(m\) and \(n\) , find the number of up- right paths that divide \(\mathcal{R}\) into two subsets (possibly empty), each of which can be tiled with dominoes.
|
| 129 |
+
|
| 130 |
+
Apply the usual black/white checkerboard coloring. We define a staircase to be the below above an up- right path (equivalently, a Young diagram rotated \(180^{\circ}\) ).
|
| 131 |
+
|
| 132 |
+
The proof is composed of two steps. One is rewriting the "domino- tileable" condition to one that is actually usable; the other is the counting part.
|
| 133 |
+
|
| 134 |
+
\(\P\) Determining when a staircase can be domino- tileable. It turns out the obvious guess is right.
|
| 135 |
+
|
| 136 |
+
## Lemma
|
| 137 |
+
|
| 138 |
+
A staircase can be tiled with dominoes if and only if the number of black and white cells in it is equal.
|
| 139 |
+
|
| 140 |
+
Proof. It's obvious equal black and white cells is necessary; we prove it's sufficient.
|
| 141 |
+
|
| 142 |
+
Assume the number of black and white cells is equal. The proof is by induction with empty staircases being vacuous. We consider the following four cases (which could overlap, pick one arbitrarily if so). Note that the latter two cases are just mirrors of the first two.
|
| 143 |
+
|
| 144 |
+
Case 1 If the rightmost two columns of the staircase have the same height, tile those two columns.
|
| 145 |
+
|
| 146 |
+
Case 2 If some two consecutive columns of the staircase differ by more than two cells in height, say the \((i - 1)^{\mathrm{st}}\) and the \(i^{\mathrm{th}}\) , then tile the top two cells in the \(i^{\mathrm{th}}\) column and rightwards.
|
| 147 |
+
|
| 148 |
+
Case 3 If the bottom two rows of the staircase have the same length, tile those two rows.
|
| 149 |
+
|
| 150 |
+
Case 4 If some two consecutive rows of the staircase differ by more than two cells in length, say the \((j - 1)^{\mathrm{st}}\) and the \(j^{\mathrm{th}}\) , then tile the leftmost two cells in the \(j^{\mathrm{th}}\) column and below.
|
| 151 |
+
|
| 152 |
+
Needless to say, each induction step preserves that the number of black squares equals the number of white squares. Hence the remaining cells can then be tiled by the induction hypothesis. See the image below for an illustration of all four cases.
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
I claim that at least one of these four cases must apply unless the staircase is empty. This could only occur if the heights of the staircase are \(1,2,\ldots ,k\) in that order. However, in that case the number of black cells and white cells are obviously not equal (unless \(k = 0\) ), so this can never occur. This completes the induction. \(\square\)
|
| 159 |
+
|
| 160 |
+
Counting. Back to the main problem. The point is that we need to find the number of up- right paths for which the two resulting regions have equal numbers of black and white squares; call such paths balanced. Since the overall \(2m\times 2n\) grid has \(2mn\) black and \(2mn\) white squares, it's sufficient for just the bottom- right staircase to have equal black and white cells.
|
| 161 |
+
|
| 162 |
+
Then in general, an up- right path is characterized by integer sequences
|
| 163 |
+
|
| 164 |
+
\[0\leq h_{1}\leq h_{2}\leq \dots \leq h_{2n}\leq 2m\]
|
| 165 |
+
|
| 166 |
+
corresponding to the heights of the staircase.
|
| 167 |
+
|
| 168 |
+
Claim — The \((h_{i})\) correspond to a balanced up- right path if and only if \(\{i:h_{i}\equiv 1\) (mod 2)} has an equal number of even and odd indices.
|
| 169 |
+
|
| 170 |
+
Proof. WLOG let's fix our coloring so that the bottom- left square is black. Then in the \(i^{\mathrm{th}}\) column, for \(i = 1,\ldots ,2n\) , has (i) one more black square than white if \(h_{i}\) is odd and \(i\equiv 1\) (mod 2); (ii) one more white square than black if \(h_{i}\) is odd and \(i\equiv 0\) (mod 2); (iii) equal black and white squares if \(h_{i}\) is even. The conclusion follows immediately. \(\square\)
|
| 171 |
+
|
| 172 |
+
The trick is to instead define
|
| 173 |
+
|
| 174 |
+
\[t_{i}:= h_{i} + i.\]
|
| 175 |
+
|
| 176 |
+
That is, we will instead describe the up- right paths by integer sequences \(t_{i}\) with
|
| 177 |
+
|
| 178 |
+
\[1\leq t_{1}< t_{2}< \dots < t_{2n}\leq 2n + 2m.\]
|
| 179 |
+
|
| 180 |
+
Claim — The \((t_{i})\) correspond to a balanced up- right path if and only if the set \(\{t_{1},\ldots ,t_{2n}\}\) has an equal number of even and odd elements.
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
Proof. Translating the four cases between the two notations gives the following table:
|
| 185 |
+
|
| 186 |
+
<table><tr><td></td><td>i even</td><td>i odd</td><td></td><td>i even</td><td>i odd</td></tr><tr><td>hi≡1 (mod 2)</td><td>a</td><td>b</td><td>⇔</td><td>ti≡1 (mod 2)</td><td>a 2n-b</td></tr><tr><td>hi≡0 (mod 2)</td><td>2n-a</td><td>2n-b</td><td></td><td>ti≡0 (mod 2)</td><td>2n-a b.</td></tr></table>
|
| 187 |
+
|
| 188 |
+
Then we have
|
| 189 |
+
|
| 190 |
+
balanced \(\iff a = b\iff a + (2n - b) = (2n - a) + b\iff \# \{\mathrm{odd} t_i\} = \# \{\mathrm{even} t_i\}\) as desired.
|
| 191 |
+
|
| 192 |
+
Hence we must count the number of \(2m\) - element subsets of \(\{1,2,\ldots ,2n + 2m\}\) with \(m\) even and \(m\) odd terms. Since the even and odd terms can be chosen separately, this gives an answer of \(\binom{n+m}{m}^2\) .
|
| 193 |
+
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
## \(\S 2\) Solutions to Day 2
|
| 197 |
+
|
| 198 |
+
## \(\S 2.1\) JMO 2025/4, proposed by Hung- Hsun Yu
|
| 199 |
+
|
| 200 |
+
Available online at https://aops.com/community/p34335897.
|
| 201 |
+
|
| 202 |
+
## Problem statement
|
| 203 |
+
|
| 204 |
+
Let \(n\) be a positive integer, and let \(a_{0}\geq a_{1}\geq \dots \geq a_{n}\geq 0\) be integers. Prove that
|
| 205 |
+
|
| 206 |
+
\[\sum_{i = 0}^{n}i\binom{a_{i}}{2}\leq \frac{1}{2}\binom{a_{0} + a_{1} + \cdots + a_{n}}{2}.\]
|
| 207 |
+
|
| 208 |
+
For \(n = 0\) (which we permit) there is nothing to prove. Hence to prove by induction on \(n\) , it would be sufficient to verify
|
| 209 |
+
|
| 210 |
+
\[2n\binom{a_{n}}{2}\leq \binom{a_{0} + a_{1} + \cdots + a_{n}}{2} -\binom{a_{0} + a_{1} + \cdots + a_{n - 1}}{2}.\]
|
| 211 |
+
|
| 212 |
+
Rearranging the terms around, that's equivalent to proving
|
| 213 |
+
|
| 214 |
+
\[\iff 2n(a_{n}^{2} - a_{n})\leq a_{n}^{2} + a_{n}\cdot (2(a_{0} + \cdot \cdot \cdot +a_{n - 1}) - 1)\] \[\iff 0\leq 2a_{n}(a_{0} + \cdot \cdot \cdot +a_{n - 1} - na_{n}) + a_{n}(a_{n} + 2n - 1).\]
|
| 215 |
+
|
| 216 |
+
However, the last line is obvious because \(\min (a_{0},\ldots ,a_{n - 1})\geq a_{n}\) , and \(a_{n}\geq 0\)
|
| 217 |
+
|
| 218 |
+
Remark. The only equality case is when \(a_{0}\in \{0,1\}\) and \(a_{i} = 0\) for \(i\geq 1\)
|
| 219 |
+
|
| 220 |
+
The bound in the problem is extremely loose and pretty much anything will work.
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
## \(\S 2.2\) JMO 2025/5, proposed by Carl Schildkraut
|
| 225 |
+
|
| 226 |
+
Available online at https://aops.com/community/p34335844.
|
| 227 |
+
|
| 228 |
+
## Problem statement
|
| 229 |
+
|
| 230 |
+
Let \(H\) be the orthocenter of an acute triangle \(ABC\) , let \(F\) be the foot of the altitude from \(C\) to \(AB\) , and let \(P\) be the reflection of \(H\) across \(BC\) . Suppose that the circumcircle of triangle \(AFP\) intersects line \(BC\) at two distinct points \(X\) and \(Y\) . Prove that \(CX = CY\) .
|
| 231 |
+
|
| 232 |
+
Let \(Q\) be the antipode of \(B\) .
|
| 233 |
+
|
| 234 |
+
Claim — \(AHQC\) is a parallelogram, and \(APCQ\) is an isosceles trapezoid.
|
| 235 |
+
|
| 236 |
+
Proof. As \(\overline{AH} \perp \overline{BC} \perp \overline{CQ}\) and \(\overline{CF} \perp \overline{AB} \perp \overline{AQ}\) .
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
Let \(M\) be the midpoint of \(\overline{QC}\) .
|
| 242 |
+
|
| 243 |
+
Claim — Point \(M\) is the circumcenter of \(\triangle AFP\) .
|
| 244 |
+
|
| 245 |
+
Proof. It's clear that \(MA = MP\) from the isosceles trapezoid. As for \(MA = MF\) , let \(N\) denote the midpoint of \(\overline{AF}\) ; then \(\overline{MN}\) is a midline of the parallelogram, so \(\overline{MN} \perp \overline{AF}\) . \(\square\)
|
| 246 |
+
|
| 247 |
+
Since \(\overline{CM} \perp \overline{BC}\) and \(M\) is the center of \((AFP)\) , it follows \(CX = CY\) .
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
## \(\S 2.3\) JMO 2025/6, proposed by Enrique Treviño
|
| 252 |
+
|
| 253 |
+
Available online at https://aops.com/community/p34335894.
|
| 254 |
+
|
| 255 |
+
## Problem statement
|
| 256 |
+
|
| 257 |
+
Let \(S\) be a set of integers with the following properties:
|
| 258 |
+
|
| 259 |
+
\(\{1,2,\ldots ,2025\} \subseteq S\)
|
| 260 |
+
|
| 261 |
+
If \(a,b\in S\) and \(\gcd (a,b) = 1\) , then \(a b\in S\)
|
| 262 |
+
|
| 263 |
+
If \(s + 1\) is composite for some \(s\in S\) , then all positive divisors of \(s + 1\) are in \(S\)
|
| 264 |
+
|
| 265 |
+
Prove that \(S\) contains all positive integers.
|
| 266 |
+
|
| 267 |
+
We prove by induction on \(N\) that \(S\) contains \(\{1,\ldots ,N\}\) with the base cases being \(N = 1,\ldots ,2025\) already given.
|
| 268 |
+
|
| 269 |
+
For the inductive step, to show \(N + 1\in S\)
|
| 270 |
+
|
| 271 |
+
If \(N + 1\) is composite we're already done from the third bullet.
|
| 272 |
+
|
| 273 |
+
Otherwise, assume \(N + 1 = p\geq 2025\) is an (odd) prime number. We say a number is good if the prime powers in its prime factorization are all less than \(p\) . Hence by the second bullet (repeatedly), good numbers are in \(S\) . Now our proof is split into three cases:
|
| 274 |
+
|
| 275 |
+
Case 1. Suppose neither \(p - 1\) nor \(p + 1\) is a power of 2 (but both are still even). We claim that the number
|
| 276 |
+
|
| 277 |
+
\[s:= p^{2} - 1 = (p - 1)(p + 1)\]
|
| 278 |
+
|
| 279 |
+
is good. Indeed, one of the numbers has only a single factor of 2, and the other by hypothesis is not a power of 2 (but still even). So the largest power of 2 dividing \(p^{2} - 1\) is certainly less than \(p\) . And every other prime power divides at most one of \(p - 1\) and \(p + 1\) .
|
| 280 |
+
|
| 281 |
+
Hence \(s:= p^{2} - 1\) is good. As \(s + 1 = p^{2}\) , Case 1 is done.
|
| 282 |
+
|
| 283 |
+
Case 2. Suppose \(p + 1\) is a power of 2; that is \(p = 2^{q} - 1\) . Since \(p > 2025\) , we assume \(q\geq 11\) is odd. First we contend that the number
|
| 284 |
+
|
| 285 |
+
\[s^{\prime}:= 2^{q + 1} - 1 = \left(2^{(q + 1) / 2} - 1\right)\left(2^{(q + 1) / 2} + 1\right)\]
|
| 286 |
+
|
| 287 |
+
is good. Indeed, this follows from the two factors being coprime and both less than \(p\) . Hence \(s^{\prime} + 1 = 2^{q + 1}\) is in \(S\) .
|
| 288 |
+
|
| 289 |
+
Thus, we again have
|
| 290 |
+
|
| 291 |
+
\[s:= p^{2} - 1 = (p - 1)(p + 1)\in S\]
|
| 292 |
+
|
| 293 |
+
as we did in the previous case, because the largest power of 2 dividing \(p^{2} - 1\) will be exactly \(2^{q + 1}\) which is known to be in \(S\) . And since \(s + 1 = p^{2}\) , Case 2 is done.
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
Case 3. Finally suppose \(p - 1\) is a power of 2; that is \(p = 2^{2^{e}} + 1\) is a Fermat prime. Then in particular, \(p \equiv 2\) (mod 3). Now observe that
|
| 298 |
+
|
| 299 |
+
\[s:= 2p - 1\equiv 0\pmod {3}\]
|
| 300 |
+
|
| 301 |
+
and moreover \(2p - 1\) is not a power of 3 (it would imply \(2^{2^{e} + 1} + 1 = 3^{k}\) , which is impossible for \(k \geq 3\) by Zsigmondy/Mihailescu/etc.). So \(s\) is good, and since \(s + 1 = 2p\) , Case 3 is done.
|
| 302 |
+
|
| 303 |
+
Having finished all the cases, we conclude \(p \in S\) and the induction is done.
|
| 304 |
+
|
| 305 |
+
Remark. In fact just \(2025 \in S\) is sufficient as a base case; however this requires a bit more work to check. Here is how:
|
| 306 |
+
|
| 307 |
+
- From \(2025 \in S\) we get \(2026 = 2 \cdot 1013\) , so \(2,1013 \in S\) .
|
| 308 |
+
|
| 309 |
+
- From \(1013 + 1 = 1014 = 2 \cdot 3 \cdot 13^{2}\) we get \(3,13 \in S\) .
|
| 310 |
+
|
| 311 |
+
- From \(3 + 1 = 4\) we get \(4 \in S\) .
|
| 312 |
+
|
| 313 |
+
- \(3 \cdot 13 + 1 = 40 = 2^{3} \cdot 5\) we get \(5 \in S\) .
|
| 314 |
+
|
| 315 |
+
- Once \(\{1,2,\ldots ,5\} \subseteq S\) , the induction above actually works fine; that is, \(N \leq 5\) are sufficient as base cases for the earlier cases to finish the rest of the problem. (Case 2 works once \(q \geq 3\) , and Case 3 works once \(e \geq 2\) .)
|
| 316 |
+
|
| 317 |
+
However, \(\{1,2,3,4\} \subseteq S\) is not sufficient; for example \(S = \{1,2,3,4,6,12\}\) satisfies all the problem conditions.
|
| 318 |
+
|
| 319 |
+
|
USAJMO/raw/en-JMO-2025-notes.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f797d6d8dc328cbf00527170cf0799ba5eb99f5f03bba1f6b72e2b2becd89c1
|
| 3 |
+
size 207451
|
USAJMO/segment_script/segment_2025.py
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
# -----------------------------------------------------------------------------
|
| 5 |
+
import json
|
| 6 |
+
import re
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
from rapidfuzz import fuzz
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def clean_text(text: str):
|
| 13 |
+
text = re.sub(
|
| 14 |
+
r"\nAvailable online at.+?\.\s\s$", "", text, flags=re.DOTALL | re.MULTILINE
|
| 15 |
+
)
|
| 16 |
+
return text
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def extract_problems(markdown_text: str):
|
| 20 |
+
problems = {}
|
| 21 |
+
|
| 22 |
+
# 1. Find the block of text containing the problems
|
| 23 |
+
# Block starts with '## Problems'
|
| 24 |
+
# and ends before '## \(S 1\) Solutions to Day 1'
|
| 25 |
+
problems_section = re.search(
|
| 26 |
+
r"^## Problems\s*$(.*?)^##.*Solutions to Day 1",
|
| 27 |
+
markdown_text,
|
| 28 |
+
re.DOTALL | re.MULTILINE,
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
if not problems_section:
|
| 32 |
+
print(" - Not found '## Problems' section.")
|
| 33 |
+
return problems
|
| 34 |
+
|
| 35 |
+
problems_block = problems_section.group(1)
|
| 36 |
+
|
| 37 |
+
# 2. Split the block into individual problems
|
| 38 |
+
# Each problem starts with a number followed by a dot and space (e.g., '1. ')
|
| 39 |
+
matchs = list(re.finditer(r"^(\d+)\.\s+", problems_block, flags=re.MULTILINE))
|
| 40 |
+
|
| 41 |
+
# Split the text into parts using the problem numbers as delimiters
|
| 42 |
+
for i, m in enumerate(matchs):
|
| 43 |
+
problem_label = m.group(1)
|
| 44 |
+
problem = problems_block[
|
| 45 |
+
m.end() : matchs[i + 1].start()
|
| 46 |
+
if i + 1 < len(matchs)
|
| 47 |
+
else len(problems_block)
|
| 48 |
+
]
|
| 49 |
+
|
| 50 |
+
problems[problem_label] = (problem.strip(), m.group())
|
| 51 |
+
|
| 52 |
+
print(f" - Extracted {len(problems)} problems.")
|
| 53 |
+
|
| 54 |
+
return problems
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def extract_solutions(markdown_text):
|
| 58 |
+
solutions = {}
|
| 59 |
+
|
| 60 |
+
# 1. Find the block of text containing the solutions
|
| 61 |
+
# Block starts with '## \(S 1\) Solutions to Day 1' and end of document
|
| 62 |
+
solutions_section = re.search(
|
| 63 |
+
r"^##.*?Solutions to Day 1\s*$(.*)",
|
| 64 |
+
markdown_text,
|
| 65 |
+
re.DOTALL | re.MULTILINE,
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
if not solutions_section:
|
| 69 |
+
print(" - Not found Solutions section.")
|
| 70 |
+
return solutions
|
| 71 |
+
|
| 72 |
+
solutions_block = solutions_section.group(1)
|
| 73 |
+
|
| 74 |
+
## \(\S 1.1\) JMO 2025/1, proposed by John Berman
|
| 75 |
+
# 2. Split the block into individual solutions
|
| 76 |
+
matchs = list(
|
| 77 |
+
re.finditer(r"^##.*?JMO\s*?\d{4}\/(\d+).*?\n$", solutions_block, flags=re.MULTILINE)
|
| 78 |
+
)
|
| 79 |
+
|
| 80 |
+
# Split the text into parts using the solution numbers as delimiters
|
| 81 |
+
for i, m in enumerate(matchs):
|
| 82 |
+
problem_label = m.group(1)
|
| 83 |
+
solution = solutions_block[
|
| 84 |
+
m.end() : matchs[i + 1].start()
|
| 85 |
+
if i + 1 < len(matchs)
|
| 86 |
+
else len(solutions_block)
|
| 87 |
+
]
|
| 88 |
+
|
| 89 |
+
solutions[problem_label] = (solution.strip(), m.group())
|
| 90 |
+
|
| 91 |
+
print(f" - Extracted {len(solutions)} solutions.")
|
| 92 |
+
|
| 93 |
+
return solutions
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
def join(problems: dict, solutions: dict):
|
| 97 |
+
pairs = []
|
| 98 |
+
|
| 99 |
+
for problem_label, (problem, p_match) in problems.items():
|
| 100 |
+
solution, s_match = solutions.get(problem_label)
|
| 101 |
+
|
| 102 |
+
# Clean solution by removing the part that overlaps with the problem statement
|
| 103 |
+
problem_align = fuzz.partial_ratio_alignment(solution, problem)
|
| 104 |
+
solution = solution.replace(
|
| 105 |
+
solution[problem_align.src_start : problem_align.src_end], ""
|
| 106 |
+
)
|
| 107 |
+
solution = re.sub(
|
| 108 |
+
r"^\s*## Problem statement", "", solution, flags=re.IGNORECASE
|
| 109 |
+
).strip()
|
| 110 |
+
|
| 111 |
+
if not solution:
|
| 112 |
+
print(f" - Warning: No solution found for problem {problem_label}.")
|
| 113 |
+
pairs.append((problem, solution, problem_label, p_match, s_match))
|
| 114 |
+
|
| 115 |
+
return pairs
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def write_pairs(output_file: Path, pairs: list, year: str, project_root: Path):
|
| 119 |
+
output_jsonl_text = ""
|
| 120 |
+
for problem, solution, problem_label, p_match, s_match in pairs:
|
| 121 |
+
output_jsonl_text += (
|
| 122 |
+
json.dumps(
|
| 123 |
+
{
|
| 124 |
+
"year": year,
|
| 125 |
+
"tier": "T3",
|
| 126 |
+
"problem_label": problem_label,
|
| 127 |
+
"problem_type": None,
|
| 128 |
+
"exam": "USAJMO",
|
| 129 |
+
"problem": problem,
|
| 130 |
+
"solution": solution,
|
| 131 |
+
"metadata": {
|
| 132 |
+
"resource_path": output_file.relative_to(
|
| 133 |
+
project_root
|
| 134 |
+
).as_posix(),
|
| 135 |
+
"problem_match": p_match,
|
| 136 |
+
"solution_match": s_match,
|
| 137 |
+
},
|
| 138 |
+
},
|
| 139 |
+
ensure_ascii=False,
|
| 140 |
+
)
|
| 141 |
+
+ "\n"
|
| 142 |
+
)
|
| 143 |
+
|
| 144 |
+
output_file.write_text(output_jsonl_text, encoding="utf-8")
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
if __name__ == "__main__":
|
| 148 |
+
compet_base_path = Path(__file__).resolve().parent.parent
|
| 149 |
+
compet_md_path = compet_base_path / "md"
|
| 150 |
+
seg_output_path = compet_base_path / "segmented"
|
| 151 |
+
project_root = compet_base_path.parent
|
| 152 |
+
|
| 153 |
+
num_problems = 0
|
| 154 |
+
num_solutions = 0
|
| 155 |
+
|
| 156 |
+
md_files = [
|
| 157 |
+
_
|
| 158 |
+
for _ in compet_md_path.glob("**/*.md")
|
| 159 |
+
if int(re.search(r"\d{4}", _.as_posix()).group()) in [2025]
|
| 160 |
+
]
|
| 161 |
+
for md_file in md_files:
|
| 162 |
+
print(f"Processing {md_file}...")
|
| 163 |
+
output_file = seg_output_path / md_file.relative_to(compet_md_path).with_suffix(
|
| 164 |
+
".jsonl"
|
| 165 |
+
)
|
| 166 |
+
output_file.parent.mkdir(parents=True, exist_ok=True)
|
| 167 |
+
|
| 168 |
+
# Read the markdown file
|
| 169 |
+
markdown_text = "\n" + md_file.read_text(encoding="utf-8")
|
| 170 |
+
markdown_text = clean_text(markdown_text)
|
| 171 |
+
|
| 172 |
+
problems = extract_problems(markdown_text)
|
| 173 |
+
solutions = extract_solutions(markdown_text)
|
| 174 |
+
|
| 175 |
+
num_problems += len(problems)
|
| 176 |
+
num_solutions += len(solutions)
|
| 177 |
+
|
| 178 |
+
pairs = join(problems, solutions)
|
| 179 |
+
|
| 180 |
+
year = re.search(r"\d{4}", output_file.stem).group()
|
| 181 |
+
|
| 182 |
+
write_pairs(output_file, pairs, year, project_root)
|
| 183 |
+
|
| 184 |
+
print()
|
| 185 |
+
|
| 186 |
+
print(f"Total problems extracted: {num_problems}")
|
| 187 |
+
print(f"Total solutions extracted: {num_solutions}")
|
USAJMO/segmented/en-JMO-2025-notes.jsonl
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"year": "2025", "tier": "T3", "problem_label": "1", "problem_type": null, "exam": "USAJMO", "problem": "Prove that if \\(f\\colon \\mathbb{Z}\\to \\mathbb{Z}\\) is any function, then there are infinitely many integers \\(c\\) such that the function \\(g(x) = f(x) + cx\\) is not a bijection.", "solution": "Assume for contradiction that there exists a finite \"bad\" set \\(S\\) such that \\(f(x) + cx\\) is bijective for all \\(c\\notin S\\) \n\nThe first observation is basically that given just \\(f(0)\\) and \\(f(1)\\) , or any two consecutive \\(f\\) - values, we can already find bad values of \\(c\\) . \n\nClaim — The numbers \\(f(0) - f(1)\\) , \\(f(1) - f(2)\\) , \\(f(2) - f(3)\\) , ... are all in \\(S\\) . That is, consecutive differences of \\(f\\) only take finitely many values. \n\nProof. To see that \\(f(0) - f(1)\\in S\\) , just note that \n\n\\[x\\mapsto f(x) + (f(0) - f(1))\\cdot x\\] \n\nis obviously not a bijective function, since it takes the same values at \\(x = 0\\) and \\(x = 1\\) , namely \\(f(0)\\) . The same is true for other elements. \\(\\square\\) \n\nIn particular, suppose \\(M > \\max_{s\\in S}|s|\\) . Then the function \n\n\\[g(x) = f(x) + (M + 100)x\\] \n\nis supposed to be a bijection (because \\(M + 100\\notin S\\) ), and yet \\(g(x + 1) - g(x) > 100\\) for all \\(x\\) , which is a contradiction.", "metadata": {"resource_path": "USAJMO/segmented/en-JMO-2025-notes.jsonl", "problem_match": "1. ", "solution_match": "## \\(\\S 1.1\\) JMO 2025/1, proposed by John Berman \n"}}
|
| 2 |
+
{"year": "2025", "tier": "T3", "problem_label": "2", "problem_type": null, "exam": "USAJMO", "problem": "Fix positive integers \\(k\\) and \\(d\\) . Prove that for all sufficiently large odd positive integers \\(n\\) , the digits of the base- \\(2n\\) representation of \\(n^k\\) are all greater than \\(d\\) .", "solution": "The problem actually doesn't have much to do with digits: the idea is to pick any length \\(\\ell \\leq k\\) , and look at the rightmost \\(\\ell\\) digits of \\(n^k\\) ; that is, the remainder upon division by \\((2n)^\\ell\\) . We compute it exactly: \n\nClaim — Let \\(n \\geq 1\\) be an odd integer, and \\(k \\geq \\ell \\geq 1\\) integers. Then \n\n\\[n^k \\bmod (2n)^i = c(k, \\ell) \\cdot n^i\\] \n\nfor some odd integer \\(1 \\leq c(k, \\ell) \\leq 2^\\ell - 1\\) . \n\nProof. This follows directly by the Chinese remainder theorem, with \\(c(k, \\ell)\\) being the residue class of \\(n^{k-i} \\pmod {2^\\ell}\\) (which makes sense because \\(n\\) was odd). \\(\\square\\) \n\nWe can now stake the required threshold: \n\nClaim — The problem statement holds once \\(n \\geq (d + 1) \\cdot 2^{k- 1}\\) . \n\nProof. Suppose \\(n\\) is that large. Then \\(n^k\\) has \\(k\\) digits in base- \\(2n\\) . Moreover, for each \\(1 \\leq \\ell \\leq k\\) we have \n\n\\[c(k, \\ell) \\cdot n^\\ell \\geq (d + 1) \\cdot (2n)^{\\ell - 1}\\] \n\nbecause \\(n\\) is large enough; that implies the \\(\\ell^{\\mathrm{th}}\\) digit from the right is at least \\(d + 1\\) . Hence the problem is solved. \\(\\square\\) \n\nRemark. Note it doesn't really matter that \\(c(k, i)\\) is odd per se; we only need that \\(c(k, i) \\geq 1\\) .", "metadata": {"resource_path": "USAJMO/segmented/en-JMO-2025-notes.jsonl", "problem_match": "2. ", "solution_match": "## \\(\\S 1.2\\) JMO 2025/2, proposed by John Berman \n"}}
|
| 3 |
+
{"year": "2025", "tier": "T3", "problem_label": "3", "problem_type": null, "exam": "USAJMO", "problem": "Let \\(m\\) and \\(n\\) be positive integers, and let \\(\\mathcal{R}\\) be a \\(2m\\times 2n\\) grid of unit squares. A domino is a \\(1\\times 2\\) or \\(2\\times 1\\) rectangle. An up-right path is a path from the lower-left corner of \\(\\mathcal{R}\\) to the upper-right corner of \\(\\mathcal{R}\\) formed by exactly \\(2m + 2n\\) edges of the grid squares. \n\nIn terms of \\(m\\) and \\(n\\) , find the number of up-right paths that divide \\(\\mathcal{R}\\) into two subsets (possibly empty), each of which can be tiled with dominoes.", "solution": "Let. \n\nApply the usual black/white checkerboard coloring. We define a staircase to be the below above an up- right path (equivalently, a Young diagram rotated \\(180^{\\circ}\\) ). \n\nThe proof is composed of two steps. One is rewriting the \"domino- tileable\" condition to one that is actually usable; the other is the counting part. \n\n\\(\\P\\) Determining when a staircase can be domino- tileable. It turns out the obvious guess is right. \n\n## Lemma \n\nA staircase can be tiled with dominoes if and only if the number of black and white cells in it is equal. \n\nProof. It's obvious equal black and white cells is necessary; we prove it's sufficient. \n\nAssume the number of black and white cells is equal. The proof is by induction with empty staircases being vacuous. We consider the following four cases (which could overlap, pick one arbitrarily if so). Note that the latter two cases are just mirrors of the first two. \n\nCase 1 If the rightmost two columns of the staircase have the same height, tile those two columns. \n\nCase 2 If some two consecutive columns of the staircase differ by more than two cells in height, say the \\((i - 1)^{\\mathrm{st}}\\) and the \\(i^{\\mathrm{th}}\\) , then tile the top two cells in the \\(i^{\\mathrm{th}}\\) column and rightwards. \n\nCase 3 If the bottom two rows of the staircase have the same length, tile those two rows. \n\nCase 4 If some two consecutive rows of the staircase differ by more than two cells in length, say the \\((j - 1)^{\\mathrm{st}}\\) and the \\(j^{\\mathrm{th}}\\) , then tile the leftmost two cells in the \\(j^{\\mathrm{th}}\\) column and below. \n\nNeedless to say, each induction step preserves that the number of black squares equals the number of white squares. Hence the remaining cells can then be tiled by the induction hypothesis. See the image below for an illustration of all four cases.\n\n\n\n \n\nI claim that at least one of these four cases must apply unless the staircase is empty. This could only occur if the heights of the staircase are \\(1,2,\\ldots ,k\\) in that order. However, in that case the number of black cells and white cells are obviously not equal (unless \\(k = 0\\) ), so this can never occur. This completes the induction. \\(\\square\\) \n\nCounting. Back to the main problem. The point is that we need to find the number of up- right paths for which the two resulting regions have equal numbers of black and white squares; call such paths balanced. Since the overall \\(2m\\times 2n\\) grid has \\(2mn\\) black and \\(2mn\\) white squares, it's sufficient for just the bottom- right staircase to have equal black and white cells. \n\nThen in general, an up- right path is characterized by integer sequences \n\n\\[0\\leq h_{1}\\leq h_{2}\\leq \\dots \\leq h_{2n}\\leq 2m\\] \n\ncorresponding to the heights of the staircase. \n\nClaim — The \\((h_{i})\\) correspond to a balanced up- right path if and only if \\(\\{i:h_{i}\\equiv 1\\) (mod 2)} has an equal number of even and odd indices. \n\nProof. WLOG let's fix our coloring so that the bottom- left square is black. Then in the \\(i^{\\mathrm{th}}\\) column, for \\(i = 1,\\ldots ,2n\\) , has (i) one more black square than white if \\(h_{i}\\) is odd and \\(i\\equiv 1\\) (mod 2); (ii) one more white square than black if \\(h_{i}\\) is odd and \\(i\\equiv 0\\) (mod 2); (iii) equal black and white squares if \\(h_{i}\\) is even. The conclusion follows immediately. \\(\\square\\) \n\nThe trick is to instead define \n\n\\[t_{i}:= h_{i} + i.\\] \n\nThat is, we will instead describe the up- right paths by integer sequences \\(t_{i}\\) with \n\n\\[1\\leq t_{1}< t_{2}< \\dots < t_{2n}\\leq 2n + 2m.\\] \n\nClaim — The \\((t_{i})\\) correspond to a balanced up- right path if and only if the set \\(\\{t_{1},\\ldots ,t_{2n}\\}\\) has an equal number of even and odd elements.\n\n\n\nProof. Translating the four cases between the two notations gives the following table: \n\n<table><tr><td></td><td>i even</td><td>i odd</td><td></td><td>i even</td><td>i odd</td></tr><tr><td>hi≡1 (mod 2)</td><td>a</td><td>b</td><td>⇔</td><td>ti≡1 (mod 2)</td><td>a 2n-b</td></tr><tr><td>hi≡0 (mod 2)</td><td>2n-a</td><td>2n-b</td><td></td><td>ti≡0 (mod 2)</td><td>2n-a b.</td></tr></table> \n\nThen we have \n\nbalanced \\(\\iff a = b\\iff a + (2n - b) = (2n - a) + b\\iff \\# \\{\\mathrm{odd} t_i\\} = \\# \\{\\mathrm{even} t_i\\}\\) as desired. \n\nHence we must count the number of \\(2m\\) - element subsets of \\(\\{1,2,\\ldots ,2n + 2m\\}\\) with \\(m\\) even and \\(m\\) odd terms. Since the even and odd terms can be chosen separately, this gives an answer of \\(\\binom{n+m}{m}^2\\) .\n\n\n\n## \\(\\S 2\\) Solutions to Day 2", "metadata": {"resource_path": "USAJMO/segmented/en-JMO-2025-notes.jsonl", "problem_match": "3. ", "solution_match": "## \\(\\S 1.3\\) JMO 2025/3, proposed by Wilbert Chu \n"}}
|
| 4 |
+
{"year": "2025", "tier": "T3", "problem_label": "4", "problem_type": null, "exam": "USAJMO", "problem": "Let \\(n\\) be a positive integer, and let \\(a_0 \\geq a_1 \\geq \\dots \\geq a_n \\geq 0\\) be integers. Prove that \n\n\\[\\sum_{i = 0}^{n}i\\binom{a_{i}}{2}\\leq \\frac{1}{2}\\binom{a_{0} + a_{1} + \\cdots + a_{n}}{2}.\\]", "solution": "Le] \n\nFor \\(n = 0\\) (which we permit) there is nothing to prove. Hence to prove by induction on \\(n\\) , it would be sufficient to verify \n\n\\[2n\\binom{a_{n}}{2}\\leq \\binom{a_{0} + a_{1} + \\cdots + a_{n}}{2} -\\binom{a_{0} + a_{1} + \\cdots + a_{n - 1}}{2}.\\] \n\nRearranging the terms around, that's equivalent to proving \n\n\\[\\iff 2n(a_{n}^{2} - a_{n})\\leq a_{n}^{2} + a_{n}\\cdot (2(a_{0} + \\cdot \\cdot \\cdot +a_{n - 1}) - 1)\\] \\[\\iff 0\\leq 2a_{n}(a_{0} + \\cdot \\cdot \\cdot +a_{n - 1} - na_{n}) + a_{n}(a_{n} + 2n - 1).\\] \n\nHowever, the last line is obvious because \\(\\min (a_{0},\\ldots ,a_{n - 1})\\geq a_{n}\\) , and \\(a_{n}\\geq 0\\) \n\nRemark. The only equality case is when \\(a_{0}\\in \\{0,1\\}\\) and \\(a_{i} = 0\\) for \\(i\\geq 1\\) \n\nThe bound in the problem is extremely loose and pretty much anything will work.", "metadata": {"resource_path": "USAJMO/segmented/en-JMO-2025-notes.jsonl", "problem_match": "4. ", "solution_match": "## \\(\\S 2.1\\) JMO 2025/4, proposed by Hung- Hsun Yu \n"}}
|
| 5 |
+
{"year": "2025", "tier": "T3", "problem_label": "5", "problem_type": null, "exam": "USAJMO", "problem": "Let \\(H\\) be the orthocenter of an acute triangle \\(ABC\\) , let \\(F\\) be the foot of the altitude from \\(C\\) to \\(AB\\) , and let \\(P\\) be the reflection of \\(H\\) across \\(BC\\) . Suppose that the circumcircle of triangle \\(AFP\\) intersects line \\(BC\\) at two distinct points \\(X\\) and \\(Y\\) . Prove that \\(CX = CY\\) .", "solution": "Let \\(Q\\) be the antipode of \\(B\\) . \n\nClaim — \\(AHQC\\) is a parallelogram, and \\(APCQ\\) is an isosceles trapezoid. \n\nProof. As \\(\\overline{AH} \\perp \\overline{BC} \\perp \\overline{CQ}\\) and \\(\\overline{CF} \\perp \\overline{AB} \\perp \\overline{AQ}\\) . \n\n\n \n\nLet \\(M\\) be the midpoint of \\(\\overline{QC}\\) . \n\nClaim — Point \\(M\\) is the circumcenter of \\(\\triangle AFP\\) . \n\nProof. It's clear that \\(MA = MP\\) from the isosceles trapezoid. As for \\(MA = MF\\) , let \\(N\\) denote the midpoint of \\(\\overline{AF}\\) ; then \\(\\overline{MN}\\) is a midline of the parallelogram, so \\(\\overline{MN} \\perp \\overline{AF}\\) . \\(\\square\\) \n\nSince \\(\\overline{CM} \\perp \\overline{BC}\\) and \\(M\\) is the center of \\((AFP)\\) , it follows \\(CX = CY\\) .", "metadata": {"resource_path": "USAJMO/segmented/en-JMO-2025-notes.jsonl", "problem_match": "5. ", "solution_match": "## \\(\\S 2.2\\) JMO 2025/5, proposed by Carl Schildkraut \n"}}
|
| 6 |
+
{"year": "2025", "tier": "T3", "problem_label": "6", "problem_type": null, "exam": "USAJMO", "problem": "Let \\(S\\) be a set of integers with the following properties: \n\n\\(\\{1,2,\\ldots ,2025\\} \\subseteq S.\\) If \\(a,b\\in S\\) and \\(\\gcd (a,b) = 1\\) , then \\(a b\\in S\\) If \\(s + 1\\) is composite for some \\(s\\in S\\) , then all positive divisors of \\(s + 1\\) are in \\(S\\) Prove that \\(S\\) contains all positive integers.", "solution": "Let \\rs. \n\nWe prove by induction on \\(N\\) that \\(S\\) contains \\(\\{1,\\ldots ,N\\}\\) with the base cases being \\(N = 1,\\ldots ,2025\\) already given. \n\nFor the inductive step, to show \\(N + 1\\in S\\) \n\nIf \\(N + 1\\) is composite we're already done from the third bullet. \n\nOtherwise, assume \\(N + 1 = p\\geq 2025\\) is an (odd) prime number. We say a number is good if the prime powers in its prime factorization are all less than \\(p\\) . Hence by the second bullet (repeatedly), good numbers are in \\(S\\) . Now our proof is split into three cases: \n\nCase 1. Suppose neither \\(p - 1\\) nor \\(p + 1\\) is a power of 2 (but both are still even). We claim that the number \n\n\\[s:= p^{2} - 1 = (p - 1)(p + 1)\\] \n\nis good. Indeed, one of the numbers has only a single factor of 2, and the other by hypothesis is not a power of 2 (but still even). So the largest power of 2 dividing \\(p^{2} - 1\\) is certainly less than \\(p\\) . And every other prime power divides at most one of \\(p - 1\\) and \\(p + 1\\) . \n\nHence \\(s:= p^{2} - 1\\) is good. As \\(s + 1 = p^{2}\\) , Case 1 is done. \n\nCase 2. Suppose \\(p + 1\\) is a power of 2; that is \\(p = 2^{q} - 1\\) . Since \\(p > 2025\\) , we assume \\(q\\geq 11\\) is odd. First we contend that the number \n\n\\[s^{\\prime}:= 2^{q + 1} - 1 = \\left(2^{(q + 1) / 2} - 1\\right)\\left(2^{(q + 1) / 2} + 1\\right)\\] \n\nis good. Indeed, this follows from the two factors being coprime and both less than \\(p\\) . Hence \\(s^{\\prime} + 1 = 2^{q + 1}\\) is in \\(S\\) . \n\nThus, we again have \n\n\\[s:= p^{2} - 1 = (p - 1)(p + 1)\\in S\\] \n\nas we did in the previous case, because the largest power of 2 dividing \\(p^{2} - 1\\) will be exactly \\(2^{q + 1}\\) which is known to be in \\(S\\) . And since \\(s + 1 = p^{2}\\) , Case 2 is done.\n\n\n\nCase 3. Finally suppose \\(p - 1\\) is a power of 2; that is \\(p = 2^{2^{e}} + 1\\) is a Fermat prime. Then in particular, \\(p \\equiv 2\\) (mod 3). Now observe that \n\n\\[s:= 2p - 1\\equiv 0\\pmod {3}\\] \n\nand moreover \\(2p - 1\\) is not a power of 3 (it would imply \\(2^{2^{e} + 1} + 1 = 3^{k}\\) , which is impossible for \\(k \\geq 3\\) by Zsigmondy/Mihailescu/etc.). So \\(s\\) is good, and since \\(s + 1 = 2p\\) , Case 3 is done. \n\nHaving finished all the cases, we conclude \\(p \\in S\\) and the induction is done. \n\nRemark. In fact just \\(2025 \\in S\\) is sufficient as a base case; however this requires a bit more work to check. Here is how: \n\n- From \\(2025 \\in S\\) we get \\(2026 = 2 \\cdot 1013\\) , so \\(2,1013 \\in S\\) . \n\n- From \\(1013 + 1 = 1014 = 2 \\cdot 3 \\cdot 13^{2}\\) we get \\(3,13 \\in S\\) . \n\n- From \\(3 + 1 = 4\\) we get \\(4 \\in S\\) . \n\n- \\(3 \\cdot 13 + 1 = 40 = 2^{3} \\cdot 5\\) we get \\(5 \\in S\\) . \n\n- Once \\(\\{1,2,\\ldots ,5\\} \\subseteq S\\) , the induction above actually works fine; that is, \\(N \\leq 5\\) are sufficient as base cases for the earlier cases to finish the rest of the problem. (Case 2 works once \\(q \\geq 3\\) , and Case 3 works once \\(e \\geq 2\\) .) \n\nHowever, \\(\\{1,2,3,4\\} \\subseteq S\\) is not sufficient; for example \\(S = \\{1,2,3,4,6,12\\}\\) satisfies all the problem conditions.", "metadata": {"resource_path": "USAJMO/segmented/en-JMO-2025-notes.jsonl", "problem_match": "6. ", "solution_match": "## \\(\\S 2.3\\) JMO 2025/6, proposed by Enrique Treviño \n"}}
|