{"year": "2021", "tier": "T1", "problem_label": "1", "problem_type": null, "exam": "APMO", "problem": "Prove that for each real number $r>2$, there are exactly two or three positive real numbers $x$ satisfying the equation $x^{2}=r\\lfloor x\\rfloor$.\nNote: $\\lfloor x\\rfloor$ denotes the largest integer less than or equal to $x$", "solution": "Let $r>2$ be a real number. Let $x$ be a positive real number such that $x^{2}=r\\lfloor x\\rfloor$ with $\\lfloor x\\rfloor=k$. Since $x>0$ and $x^{2}=r k$, we also have $k>0$. From $k \\leq x0$ for $x \\geq M$.\n\nLemma 1. For any positive integer $n$, the integers $P(1), P(2), \\ldots, P(n)$ leave pairwise distinct remainders upon division by $n$.\n\nProof. Assume for contradiction that this is not the case. Then, for some $1 \\leq y2 A+2021$. Each of the $2(k-A)$ integers $P(A n+y), P(A n+z), P((A+1) n+y), P((A+1) n+z), \\ldots, P((k-1) n+y), P((k-1) n+z)$ leaves one of the $k$ remainders\n\n$$\nr, n+r, 2 n+r, \\ldots,(k-1) n+r\n$$\n\nupon division by $k n$. This implies that at least $2(k-A)-k=k-2 A$ (possibly overlapping) pairs leave the same remainder upon division by $k n$. Since $k-2 A>2021$ and all of the $2(k-A)$ integers are positive, we find more than 2021 pairs $a, b$ with $a2021$, a contradiction.\n\nNext, we show that $P$ is linear. Assume that this is not the case, i.e., $\\operatorname{deg} P \\geq 2$. Then we can find a positive integer $k$ such that $P(k)-P(1) \\geq k$. This means that among the integers $P(1), P(2), \\ldots, P(P(k)-P(1))$, two of them, namely $P(k)$ and $P(1)$, leave the same remainder upon division by $P(k)-P(1)$ - contradicting the lemma (by taking $n=P(k)-P(1)$ ). Hence, $P$ must be linear.\nWe can now write $P(x)=c x+d$ with $c>0$. We prove that $c=1$ by two ways.", "metadata": {"resource_path": "APMO/segmented/en-apmo2021_sol.jsonl", "problem_match": "\nProblem 2.", "solution_match": "\nSolution "}} {"year": "2021", "tier": "T1", "problem_label": "2", "problem_type": null, "exam": "APMO", "problem": "For a polynomial $P$ and a positive integer $n$, define $P_{n}$ as the number of positive integer pairs $(a, b)$ such that $a2 c M, n\\left(1-\\frac{3}{2 c}\\right)>2022$ and $2 c \\mid n$. Notice that for any positive integers $i$ such that $\\frac{3 n}{2 c}+i2021$, a contradiction. Then, $c=1$.\n\nIf $d \\leq-2023$, then there are at least 2022 pairs $a\\alpha, \\beta, \\gamma, \\delta>0, \\alpha+\\beta=\\gamma+\\delta<\\pi$, and $\\frac{\\sin \\alpha}{\\sin \\beta}=\\frac{\\sin \\gamma}{\\sin \\delta}$, then $\\alpha=\\gamma$ and $\\beta=\\delta$.\nProof of Lemma: Let $\\theta=\\alpha+\\beta=\\gamma+\\delta$. Then $\\frac{\\sin (\\theta-\\beta)}{\\sin \\beta}=\\frac{\\sin (\\theta-\\delta)}{\\sin \\delta}$.\n\n$$\n\\begin{gathered}\n\\Longleftrightarrow \\sin (\\theta-\\beta) \\sin \\delta=\\sin (\\theta-\\delta) \\sin \\beta \\\\\n\\Longleftrightarrow(\\sin \\theta \\cos \\beta-\\sin \\beta \\cos \\theta) \\sin \\delta=(\\sin \\theta \\cos \\delta-\\sin \\delta \\cos \\theta) \\sin \\beta \\\\\n\\Longleftrightarrow \\sin \\theta \\cos \\beta \\sin \\delta=\\sin \\theta \\cos \\delta \\sin \\beta \\\\\n\\Longleftrightarrow \\sin \\theta \\sin (\\beta-\\delta)=0\n\\end{gathered}\n$$\n\nSince $0<\\theta<\\pi$, then $\\sin \\theta \\neq 0$. Therefore, $\\sin (\\beta-\\delta)=0$, and we must have $\\beta=\\delta$.\nApplying the sine rule to $\\triangle N B L$ and $\\triangle N C L$ we obtain\n\n$$\n\\begin{aligned}\n& \\frac{N B}{N L}=\\frac{\\sin \\angle B L N}{\\sin \\angle L B N} \\\\\n& \\frac{N C}{N L}=\\frac{\\sin \\angle C L N}{\\sin \\angle L C N}\n\\end{aligned}\n$$\n\nSince $\\angle L B N=\\angle L C N$, it follows that\n\n$$\n\\frac{\\sin \\angle B L N}{\\sin \\angle C L N}=\\frac{N B}{N C}=\\frac{\\sin \\angle B C N}{\\sin \\angle C B N}=\\frac{\\cos (\\gamma / 2)}{\\cos (\\beta / 2)}=\\frac{\\sin \\angle B L M}{\\sin \\angle C L M}\n$$\n\nBy the lemma, it is concluded that $\\angle B L M=\\angle B L N$ and $\\angle C L M=\\angle C L N$. Therefore, $L, M, N$ are collinear.", "metadata": {"resource_path": "APMO/segmented/en-apmo2021_sol.jsonl", "problem_match": "\nProblem 3.", "solution_match": "# Solution 1"}} {"year": "2021", "tier": "T1", "problem_label": "3", "problem_type": null, "exam": "APMO", "problem": "Let $A B C D$ be a cyclic convex quadrilateral and $\\Gamma$ be its circumcircle. Let $E$ be the intersection of the diagonals $A C$ and $B D$, let $L$ be the center of the circle tangent to sides $A B, B C$, and $C D$, and let $M$ be the midpoint of the arc $B C$ of $\\Gamma$ not containing $A$ and $D$. Prove that the excenter of triangle $B C E$ opposite $E$ lies on the line $L M$.", "solution": "Denote by $N$ the excenter of triangle $B C E$ opposite $E$. Since $B L$ bisects $\\angle A B C$, we have $\\angle C B L=$ $\\frac{\\angle A B C}{2}$. Since $M$ is the midpoint of arc $B C$, we have $\\angle M B C=\\frac{1}{2}(\\angle M B C+\\angle M C B)$ It follows by angle chasing that\n\n$$\n\\begin{aligned}\n\\angle M B L & =\\angle M B C+\\angle C B L=\\frac{1}{2}(\\angle M B C+\\angle M C B+\\angle A B C) \\\\\n& =\\frac{1}{2}(\\angle M B A+\\angle M C B)=90^{\\circ}-\\frac{\\angle B C E}{2}=\\angle B C N .\n\\end{aligned}\n$$\n\nDenote by $X$ and $Y$ the second intersections of lines $B M$ and $C M$ with the circumcircle of $B C L$, respectively. Since $\\angle M B C=\\angle M C B$, we have $B C \\| X Y$. It suffices to show that $B N \\| X L$ and $C N \\| Y L$. Indeed, from this it follows that $\\triangle B C N \\sim \\triangle X Y L$, and therefore a homothety with center $M$ that maps $B$ to $X$ and $C$ to $Y$ also maps $N$ to $L$, implying that $N$ lies on the line $L M$.\nBy symmetry, it suffices to show that $C N \\| Y L$, which is equivalent to showing that $\\angle B C N=\\angle X Y L$. But we have $\\angle B C N=\\angle M B L=\\angle X B L=\\angle X Y L$, completing the proof.", "metadata": {"resource_path": "APMO/segmented/en-apmo2021_sol.jsonl", "problem_match": "\nProblem 3.", "solution_match": "# Solution 2"}} {"year": "2021", "tier": "T1", "problem_label": "4", "problem_type": null, "exam": "APMO", "problem": "Given a $32 \\times 32$ table, we put a mouse (facing up) at the bottom left cell and a piece of cheese at several other cells. The mouse then starts moving. It moves forward except that when it reaches a piece of cheese, it eats a part of it, turns right, and continues moving forward. We say that a subset of cells containing cheese is good if, during this process, the mouse tastes each piece of cheese exactly once and then falls off the table. Show that:\n(a) No good subset consists of 888 cells.\n(b) There exists a good subset consisting of at least 666 cells.", "solution": "(a) For the sake of contradiction, assume a good subset consisting of 888 cells exists. We call those cheese-cells and the other ones gap-cells. Observe that since each cheese-cell is visited once, each gap-cell is visited at most twice (once vertically and once horizontally). Define a finite sequence $s$ whose $i$-th element is $C$ if the $i$-th step of the mouse was onto a cheese-cell, and $G$ if it was onto a gap-cell. By assumption, $s$ contains $888 C$ 's. Note that $s$ does not contain a contiguous block of 4 (or more) $C$ 's. Hence $s$ contains at least $888 / 3=296$ such $C$-blocks and thus at least $295 G^{\\prime}$ 's. But since each gap-cell is traversed at most twice, this implies there are at least $\\lceil 295 / 2\\rceil=148$ gap-cells, for a total of $888+148=1036>32^{2}$ cells, a contradiction.\n(b) Let $L_{i}, X_{i}$ be two $2^{i} \\times 2^{i}$ tiles that allow the mouse to \"turn left\" and \"cross\", respectively. In detail, the \"turn left\" tiles allow the mouse to enter at its bottom left cell facing up and to leave at its bottom left cell facing left. The \"cross\" tiles allow the mouse to enter at its top right facing down and leave at its bottom left facing left, while also to enter at its bottom left facing up and leave at its top right facing right.\n(a) Basic tiles\n(b) Inductive construction\n(c) $16 \\times 16$\n![](https://cdn.mathpix.com/cropped/2024_11_22_5e137eeb9eefa8d28dceg-4.jpg?height=373&width=1633&top_left_y=1078&top_left_x=249)\n\nNote that given two $2^{i} \\times 2^{i}$ tiles $L_{i}, X_{i}$ we can construct larger $2^{i+1} \\times 2^{i+1}$ tiles $L_{i+1}, X_{i+1}$ inductively as shown on in (b). The construction works because the path intersects itself (or the other path) only inside the smaller $X$-tiles where it works by induction.\nFor a tile $T$, let $|T|$ be the number of pieces of cheese in it. By straightforward induction, $\\left|L_{i}\\right|=\\left|X_{i}\\right|+1$ and $\\left|L_{i+1}\\right|=4 \\cdot\\left|L_{i}\\right|-1$. From the initial condition $\\left|L_{1}\\right|=3$. We now easily compute $\\left|L_{2}\\right|=11,\\left|L_{3}\\right|=43,\\left|L_{4}\\right|=171$, and $\\left|L_{5}\\right|=683$. Hence we get the desired subset.\n\n## Another proof of (a).\n\nLet $X_{N}$ be the largest possible density of cheese-cells in a good subset on an $N \\times N$ table. We will show that $X_{N} \\leq 4 / 5+o(1)$. Specifically, this gives $X_{32} \\leq 817 / 1024$. We look at the (discrete analogue) of the winding number of the trajectory of the mouse. Since the mouse enters and leaves the table, for every 4 right turns in its trajectory there has to be a self-crossing. But each self-crossing requires a different empty square, hence $X_{N} \\leq 4 / 5$.", "metadata": {"resource_path": "APMO/segmented/en-apmo2021_sol.jsonl", "problem_match": "\nProblem 4.", "solution_match": "# Solution."}} {"year": "2021", "tier": "T1", "problem_label": "5", "problem_type": null, "exam": "APMO", "problem": "Determine all functions $f: \\mathbb{Z} \\rightarrow \\mathbb{Z}$ such that $f(f(a)-b)+b f(2 a)$ is a perfect square for all integers $a$ and $b$.", "solution": ".\n\nThere are two families of functions which satisfy the condition:\n(1) $f(n)= \\begin{cases}0 & \\text { if } n \\text { is even, and } \\\\ \\text { any perfect square } & \\text { if } n \\text { is odd }\\end{cases}$\n(2) $f(n)=n^{2}$, for every integer $n$.\n\nIt is straightforward to verify that the two families of functions are indeed solutions. Now, suppose that f is any function which satisfies the condition that $f(f(a)-b)+b f(2 a)$ is a perfect square for every pair $(a, b)$ of integers. We denote this condition by $\\left(^{*}\\right)$. We will show that $f$ must belong to either Family (1) or Family (2).\nClaim 1. $f(0)=0$ and $f(n)$ is a perfect square for every integer $n$.\nProof. Plugging $(a, b) \\rightarrow(0, f(0))$ in $\\left(^{*}\\right)$ shows that $f(0)(f(0)+1)=z^{2}$ for some integer $z$. Thus, $(2 f(0)+1-2 z)(2 f(0)+1+2 z)=1$. Therefore, $f(0)$ is either -1 or 0.\nSuppose, for sake of contradiction, that $f(0)=-1$. For any integer $a$, plugging $(a, b) \\rightarrow(a, f(a))$ implies that $f(a) f(2 a)-1$ is a square. Thus, for each $a \\in \\mathbb{Z}$, there exists $x \\in \\mathbb{Z}$ such that $f(a) f(2 a)=x^{2}+1$ This implies that any prime divisor of $f(a)$ is either 2 or is congruent to $1(\\bmod 4)$, and that $4 \\nmid f(a)$, for every $a \\in \\mathbb{Z}$.\nPlugging $(a, b) \\rightarrow(0,3)$ in $\\left(^{*}\\right)$ shows that $f(-4)-3$ is a square. Thus, there is $y \\in \\mathbb{Z}$ such that $f(-4)=y^{2}+3$. Since $4 \\nmid f(-4)$, we note that $f(-4)$ is a positive integer congruent to $3(\\bmod 4)$, but any prime dividing $f(-4)$ is either 2 or is congruent to $1(\\bmod 4)$. This gives a contradiction. Therefore, $f(0)$ must be 0 .\nFor every integer $n$, plugging $(a, b) \\rightarrow(0,-n)$ in $\\left(^{*}\\right)$ shows that $f(n)$ is a square.\nReplacing $b$ with $f(a)-b$, we find that for all integers $a$ and $b$,\n\n$$\nf(b)+(f(a)-b) f(2 a) \\text { is a square. }\n$$\n\nNow, let $S$ be the set of all integers $n$ such that $f(n)=0$. We have two cases:\n\n- Case 1: $S$ is unbounded from above.\n\nWe claim that $f(2 n)=0$ for any integer $n$. Fix some integer $n$, and let $k \\in S$ with $k>f(n)$. Then, plugging $(a, b) \\mapsto(n, k)$ in $\\left({ }^{* *}\\right)$ gives us that $f(k)+(f(n)-k) f(2 n)=(f(n)-k) f(2 n)$ is a square. But $f(n)-k<0$ and $f(2 n)$ is a square by Claim 1. This is possible only if $f(2 n)=0$. In summary, $f(n)=0$ whenever $n$ is even and Claim 1 shows that $f(n)$ is a square whenever $n$ is odd.\n\n- Case 2: $S$ is bounded from above.\n\nLet $T$ be the set of all integers $n$ such that $f(n)=n^{2}$. We show that $T$ is unbounded from above. In fact, we show that $\\frac{p+1}{2} \\in T$ for all primes $p$ big enough.\nFix a prime number $p$ big enough, and let $n=\\frac{p+1}{2}$. Plugging $(a, b) \\mapsto(n, 2 n)$ in ( $\\left.{ }^{* *}\\right)$ shows us that $f(2 n)(f(n)-2 n+1)$ is a square for any integer $n$. For $p$ big enough, we have $2 n \\notin S$, so $f(2 n)$ is a non-zero square. As a result, when $p$ is big enough, $f(n)$ and $f(n)-2 n+1=f(n)-p$ are both squares. Writing $f(n)=k^{2}$ and $f(n)-p=m^{2}$ for some $k, m \\geq 0$, we have\n\n$$\n(k+m)(k-m)=k^{2}-m^{2}=p \\Longrightarrow k+m=p, k-m=1 \\Longrightarrow k=n, m=n-1\n$$\n\nThus, $f(n)=k^{2}=n^{2}$, giving us $n=\\frac{p+1}{2} \\in T$.\nNext, for all $k \\in T$ and $n \\in \\mathbb{Z}$, plugging $(a, b) \\mapsto(n, k)$ in $(* *)$ shows us that $k^{2}+(f(n)-k) f(2 n)$ is a square. But that means $(2 k-f(2 n))^{2}-\\left(f(2 n)^{2}-4 f(n) f(2 n)\\right)=4\\left(k^{2}+(f(n)-k) f(2 n)\\right)$ is also a square. When $k$ is large enough, we have $\\left|f(2 n)^{2}-4 f(n) f(2 n)\\right|+1<|2 k-f(2 n)|$. As a result, we must have $f(2 n)^{2}=4 f(n) f(2 n)$ and thus $f(2 n) \\in\\{0,4 f(n)\\}$ for all integers $n$.\nFinally, we prove that $f(n)=n^{2}$ for all integers $n$. Fix $n$, and take $k \\in T$ big enough such that $2 k \\notin S$. Then, we have $f(k)=k^{2}$ and $f(2 k)=4 f(k)=4 k^{2}$. Plugging $(a, b) \\mapsto(k, n)$ to $(* *)$ shows us that $f(n)+\\left(k^{2}-n\\right) 4 k^{2}=\\left(2 k^{2}-n\\right)^{2}+\\left(f(n)-n^{2}\\right)$ is a square. Since $T$ is unbounded from above, we can take $k \\in T$ such that $2 k \\notin S$ and also $\\left|2 k^{2}-n\\right|>\\left|f(n)-n^{2}\\right|$. This forces $f(n)=n^{2}$, giving us the second family of solution.\n\n## Another approach of Case 1.\n\nClaim 2. One of the following is true.\n(i) For every integer $n, f(2 n)=0$.\n(ii) There exists an integer $K>0$ such that for every integer $n \\geq K, f(n)>0$.\n\nProof. Suppose that there exists an integer $\\alpha \\neq 0$ such that $f(2 \\alpha)>0$. We claim that for every integer $n \\geq f(\\alpha)+1$, we have $f(n)>0$.\nFor every $n \\geq f(\\alpha)+1$, plugging $(a, b) \\rightarrow(\\alpha, f(\\alpha)-n)$ in $\\left(^{*}\\right)$ shows that $f(n)+(f(\\alpha)-n) f(2 \\alpha)$ is a square, and in particular, is non-negative. Hence, $f(n) \\geq(n-f(\\alpha)) f(2 \\alpha)>0$, as desired.\nIf $f$ belongs to Case (i), Claim 1 shows that $f$ belongs to Family (1).\nIf $f$ belongs to Case (ii), then $S$ is bounded from above. From Case 2 we get $f(n)=n^{2}$.", "metadata": {"resource_path": "APMO/segmented/en-apmo2021_sol.jsonl", "problem_match": "\nProblem 5.", "solution_match": "# Solution 1"}}