{"question": "A line in the plane is called \\emph{sunny} if it is not parallel to any of the $x$-axis, the $y$-axis, or the line $x + y = 0$.\n\nLet $n \\geq 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:\n\\begin{itemize}\n \\item for all positive integers $a$ and $b$ with $a + b \\leq n + 1$, the point $(a, b)$ lies on at least one of the lines; and\n \\item exactly $k$ of the $n$ lines are sunny.\n\\end{itemize}", "problem_idx": "IMO2025-1", "model_prediction": {"proof": "### 1. Definitions and notation\n\nLet \\(S=\\{(a,b)\\in\\mathbb{Z}_{>0}^2 \\mid a+b\\le n+1\\}\\). The number of points in \\(S\\) is \\(N=\\frac{n(n+1)}{2}\\). \nA line is called **sunny** if it is not parallel to the \\(x\\)-axis, the \\(y\\)-axis, or the line \\(x+y=0\\). \nThus a non\u2011sunny line is either horizontal (\\(y=c\\)), vertical (\\(x=c\\)), or of slope \\(-1\\) (\\(x+y=c\\)).\n\nWe are given \\(n\\ge 3\\) and have to determine all integers \\(k\\ge 0\\) for which there exist \\(n\\) distinct lines covering \\(S\\) with exactly \\(k\\) sunny lines.\n\n### 2. Constructions (sufficiency)\n\nWe exhibit coverings for \\(k=0,1,3\\).\n\n* **\\(k=0\\)**. \n Take the \\(n\\) horizontal lines \\(y=1,y=2,\\dots ,y=n\\). All are non\u2011sunny and together they cover every point of \\(S\\).\n\n* **\\(k=1\\)**. \n *For \\(n=3\\):* lines \\(x=1\\), \\(y=1\\) (non\u2011sunny) and \\(y=x\\) (sunny). \n *For \\(n\\ge 4\\):* \n \\[\n \\begin{aligned}\n &\\text{vertical } x=1,\\,x=2,\\,\\dots,\\,x=n-3 \\quad\\text{(non\u2011sunny)},\\\\\n &\\text{horizontal } y=1 \\quad\\text{(non\u2011sunny)},\\\\\n &\\text{diagonal } x+y=n+1 \\quad\\text{(non\u2011sunny)},\\\\\n &\\text{sunny line through }(n-2,2)\\text{ with slope }1:\\; y=x+4-n.\n \\end{aligned}\n \\]\n One checks that all points of \\(S\\) are covered (the only point not on any non\u2011sunny line is \\((n-2,2)\\), which lies on the sunny line).\n\n* **\\(k=3\\)**. \n For any \\(n\\ge 3\\) take \n \\[\n \\begin{aligned}\n &\\text{vertical lines } x=1,\\,x=2,\\,\\dots,\\,x=n-3 \\quad(\\text{if }n=3\\text{ this list is empty}),\\\\\n &\\text{three sunny lines:}\\\\\n &\\ell_1:\\text{ through }(n-2,1)\\text{ and }(n-1,2),\\\\\n &\\ell_2:\\text{ through }(n-2,2)\\text{ and }(n,1),\\\\\n &\\ell_3:\\text{ through }(n-2,3)\\text{ and }(n-1,1).\n \\end{aligned}\n \\]\n The vertical lines cover all points with \\(x\\le n-3\\). The remaining six points\n \\((n-2,1),(n-2,2),(n-2,3),(n-1,1),(n-1,2),(n,1)\\) are covered respectively by\n \\(\\ell_1,\\ell_2,\\ell_3\\) (each covers two of them). All lines are distinct and the three sunny lines are indeed sunny (their slopes are \\(1,-\\frac12,-2\\)).\n\nThus \\(k=0,1,3\\) are attainable for every \\(n\\ge 3\\).\n\n### 3. Necessity \u2013 reduction to a triangle\n\nAssume we have a covering of \\(S\\) by \\(n\\) lines, exactly \\(k\\) of which are sunny. Let \\(m=n-k\\) be the number of non\u2011sunny lines. Among these, denote by \\(h,v,d\\) the numbers of horizontal, vertical and diagonal lines, respectively, so that\n\n\\[\nh+v+d=m=n-k.\n\\]\n\n#### 3.1. Structure of the non\u2011sunny lines\n\nConsider a row \\(y=i\\) with \\(1\\le i\\le n\\). If this row is not used as a horizontal line, the points of the row can be covered only by vertical lines (each contributes at most one point in that row), diagonal lines (at most one point each) and sunny lines. Since a sunny line can contain at most one point of a fixed horizontal line, the number of sunny points in row \\(i\\) is at most \\(k\\). On the other hand, the number of points of \\(S\\) in row \\(i\\) is \\(n+1-i\\). The vertical and diagonal lines together can cover at most \\(v+d\\) points of this row. Hence\n\n\\[\n(n+1-i)-(v+d) \\le k \\qquad\\text{for every } i\\notin H,\n\\]\n\nwhere \\(H\\) is the set of rows used as horizontal lines. Substituting \\(v+d = (n-k)-h\\) gives\n\n\\[\nn+1-i - ((n-k)-h) \\le k \\;\\Longrightarrow\\; 1-i+h \\le 0 \\;\\Longrightarrow\\; h \\le i-1.\n\\]\n\nThus any row \\(i\\le h\\) cannot be absent from \\(H\\); therefore the \\(h\\) horizontal lines must be exactly the rows \\(1,2,\\dots ,h\\). In particular, if \\(h>0\\) then \\(H=\\{1,\\dots ,h\\}\\).\n\nAn analogous argument for columns yields that the \\(v\\) vertical lines must be the columns \\(1,2,\\dots ,v\\).\n\nNow consider a diagonal \\(x+y=s\\) with \\(2\\le s\\le n+1\\). If this diagonal is not used as a non\u2011sunny line, the points on it can be covered by horizontal lines (at most one point each), vertical lines (at most one each) and sunny lines (at most one each). Hence\n\n\\[\n(s-1)-(h+v) \\le k.\n\\]\n\nUsing \\(h+v = (n-k)-d\\) we obtain\n\n\\[\ns-1 - ((n-k)-d) \\le k \\;\\Longrightarrow\\; s-1 - n + d \\le 0 \\;\\Longrightarrow\\; d \\le n+1-s.\n\\]\n\nConsequently, every diagonal with \\(s > n+1-d\\) must belong to \\(D\\) (the set of used diagonals). Since there are exactly \\(d\\) diagonal lines, they must be precisely the \\(d\\) diagonals with the largest constants, i.e. \n\\(D=\\{n+1,\\,n,\\,\\dots,\\,n+2-d\\}\\).\n\nTo summarise, in any covering the non\u2011sunny lines are **forced** to be\n\n* horizontal: \\(y=1,2,\\dots ,h\\),\n* vertical: \\(x=1,2,\\dots ,v\\),\n* diagonal: \\(x+y = n+1,\\,n,\\,\\dots,\\,n+2-d\\),\n\nwith \\(h+v+d = n-k\\).\n\n#### 3.2. The uncovered set\n\nThe points of \\(S\\) that are **not** covered by these non\u2011sunny lines are exactly those that satisfy\n\n\\[\nx \\ge v+1,\\qquad y \\ge h+1,\\qquad x+y \\le n+1-d.\n\\]\n\nSet \\(x' = x-v\\), \\(y' = y-h\\). Then \\(x',y'\\ge 1\\) and\n\n\\[\nx'+y' \\le n+1-d - (v+h) = n+1-d - (n-k-d) = k+1.\n\\]\n\nTherefore the uncovered set is an affine copy of the triangle\n\n\\[\nT_k = \\{(x',y')\\in\\mathbb{Z}_{>0}^2 \\mid x'+y'\\le k+1\\},\n\\]\n\nwhich contains exactly \\(R=\\frac{k(k+1)}{2}\\) points. These points must be covered entirely by the \\(k\\) sunny lines. Moreover, translating the whole picture does not change slopes, so the problem reduces to:\n\n> **Subproblem:** Can the triangle \\(T_k\\) be covered by \\(k\\) sunny lines?\n\n### 4. Covering \\(T_k\\) with \\(k\\) sunny lines\n\nFrom now on we work inside \\(T_k\\) and denote its points by \\((x,y)\\) with \\(x,y\\ge1,\\;x+y\\le k+1\\).\n\n#### 4.1. Forced incidence with the three sides\n\nThe triangle \\(T_k\\) has three natural boundaries:\n\n* the bottom row \\(A = \\{(a,1)\\mid 1\\le a\\le k\\}\\),\n* the left column \\(B = \\{(1,b)\\mid 1\\le b\\le k\\}\\),\n* the hypotenuse \\(C = \\{(c,k+1-c)\\mid 1\\le c\\le k\\}\\).\n\nEach sunny line, because it is not horizontal, not vertical, and not of slope \\(-1\\), meets each of these three lines at most once. Since \\(|A|=|B|=|C|=k\\) and we have exactly \\(k\\) sunny lines that must cover all points of \\(T_k\\), a simple counting argument shows:\n\n* Every sunny line contains **exactly one** point of \\(A\\), exactly one of \\(B\\), and exactly one of \\(C\\).\n* The assignments of these points to lines give three permutations of \\(\\{1,\\dots ,k\\}\\).\n\nConsequently, we may label the sunny lines by the \\(x\\)\u2011coordinate of the point they contain from \\(A\\). For each \\(a\\in\\{1,\\dots ,k\\}\\) there is a unique sunny line \\(L_a\\) passing through \\((a,1)\\). This line also passes through a point \\((1,b_a)\\in B\\) and a point \\((c_a,k+1-c_a)\\in C\\). The maps \\(a\\mapsto b_a\\) and \\(a\\mapsto c_a\\) are permutations of \\(\\{1,\\dots ,k\\}\\).\n\n#### 4.2. Collinearity condition\n\nFor a line \\(L_a\\) with \\(a\\ge 2\\) the three points are distinct. The collinearity of \\((a,1)\\), \\((1,b_a)\\) and \\((c_a,k+1-c_a)\\) gives\n\n\\[\n(b_a-1)(c_a-a) = (k-c_a)(1-a).\n\\tag{\u2605}\n\\]\n\nSolving for \\(c_a\\) yields (after elementary algebra)\n\n\\[\nc_a = a - \\frac{(a-1)(k-a)}{b_a-a}.\n\\tag{1}\n\\]\n\n(For \\(a=1\\) we have \\(b_1=1\\) because \\((1,1)\\in A\\cap B\\); the line is then determined by \\((1,1)\\) and \\((c_1,k+1-c_1)\\). The condition that it is sunny forces \\(c_1\\notin\\{1,k\\}\\).)\n\n#### 4.3. Consequences of (1)\n\n* **Case \\(a=2\\).** \n Then \\((a-1)(k-a)=k-2\\). Since \\(b_2\\neq1,2\\), we have \\(b_2\\in\\{3,\\dots ,k\\}\\). Let \\(d=b_2-2\\in\\{1,\\dots ,k-2\\}\\). Equation (1) becomes \n \\[\n c_2 = 2 - \\frac{k-2}{d}.\n \\]\n For \\(c_2\\) to be an integer between \\(1\\) and \\(k\\) we must have \\(\\frac{k-2}{d}=1\\) and therefore \\(d=k-2\\), i.e. \\(b_2=k\\) and \\(c_2=1\\).\n\n* **Case \\(a=k\\).** \n Here \\((a-1)(k-a)=0\\), so (1) gives \\(c_k = k\\) independently of \\(b_k\\) (as long as \\(b_k\\neq k\\)). Hence \\(c_k=k\\).\n\n* **Case \\(a=k-1\\) (requires \\(k\\ge 3\\)).** \n Now \\((a-1)(k-a)=(k-2)\\cdot1 = k-2\\). \n The value \\(b_{k-1}\\) must be distinct from \\(1\\), from \\(k-1\\) (to avoid slope \\(-1\\)), and also from the already used \\(b_2=k\\). Hence \\(b_{k-1}\\in\\{2,3,\\dots ,k-2\\}\\). In particular \\(b_{k-1}0\\). Then (1) becomes \n \\[\n c_{k-1} = (k-1) - \\frac{k-2}{-(t)} = (k-1) + \\frac{k-2}{t}.\n \\]\n Since \\(c_{k-1}\\le k\\), we must have \\(\\frac{k-2}{t}\\le 1\\), i.e. \\(t\\ge k-2\\). \n But \\(t = (k-1)-b_{k-1} \\le (k-1)-2 = k-3\\). \n For \\(k\\ge 4\\) we have \\(k-3 < k-2\\), so no admissible \\(b_{k-1}\\) exists. Hence **no covering is possible for \\(k\\ge 4\\)**.\n\n#### 4.4. Small values of \\(k\\)\n\n* **\\(k=0\\)**. This corresponds to the situation with no sunny lines; we already have a construction.\n* **\\(k=1\\)**. The triangle \\(T_1\\) consists of the single point \\((1,1)\\). Any sunny line through it works.\n* **\\(k=2\\)**. \\(T_2\\) contains the three points \\((1,1),(1,2),(2,1)\\). Any line through two of them is either vertical, horizontal, or of slope \\(-1\\), hence non\u2011sunny. Therefore two sunny lines can cover at most two points, leaving the third uncovered. Thus \\(k=2\\) is impossible.\n* **\\(k=3\\)**. The constraints derived above are compatible and indeed we have the explicit construction given in Section\u202f2 (the three sunny lines). Hence \\(k=3\\) is possible.\n\n### 5. Conclusion\n\nFor every integer \\(n\\ge 3\\), the numbers \\(k\\) of sunny lines that can appear in a covering of \\(S\\) by \\(n\\) distinct lines are exactly \\(k=0\\), \\(k=1\\) and \\(k=3\\).\n\n---", "average_automatic_rating": 1.0, "human_rating": 7}} {"question": "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 \\ne A \\) and meets \\( \\Gamma \\) again at \\( F \\ne A \\). Let \\( H \\) be the orthocentre of triangle \\( PMN \\).\n\nProve that the line through \\( H \\) parallel to \\( AP \\) is tangent to the circumcircle of triangle \\( BEF \\).", "problem_idx": "IMO2025-2", "model_prediction": {"proof": "**Step 1 \u2013 Setting up coordinates** \nPlace the circles in the plane so that \n\\[\nM=(0,0),\\qquad N=(d,0)\\quad (d>0).\n\\] \n\\(\\Omega\\) is the circle centred at \\(M\\) with radius \\(r\\):\u2003\\(x^2+y^2=r^2\\). \n\\(\\Gamma\\) is the circle centred at \\(N\\) with radius \\(R\\) (\\(R>r\\)):\u2003\\((x-d)^2+y^2=R^2\\). \nBecause the circles intersect in two distinct points we have \\(R-r0),\n\\] \nwhere \n\\[\nx_0=\\frac{d^2+r^2-R^2}{2d},\\qquad \ny_0=\\sqrt{r^2-x_0^2}=\\frac{\\sqrt{\\bigl((d+r)^2-R^2\\bigr)\\bigl(R^2-(d-r)^2\\bigr)}}{2d}.\n\\]\n\n**Step 2 \u2013 Circumcenter \\(P\\) of \\(\\triangle ACD\\)** \nSince \\(P\\) is equidistant from \\(C\\) and \\(D\\) it lies on the perpendicular bisector of \\(CD\\), i.e. on the vertical line \n\\[\nx=\\frac{-r+(d+R)}{2}=\\frac{d+R-r}{2}.\n\\] \nThus \n\\[\np_x=\\frac{d+R-r}{2}.\n\\] \nLet \\(P=(p_x,p_y)\\). Because \\(M\\) lies on the perpendicular bisector of \\(AC\\) and \\(MP\\perp AC\\), we obtain \n\\[\n(r+x_0)p_x+y_0p_y=0\\quad\\Longrightarrow\\quad \np_y=-\\frac{(r+x_0)p_x}{y_0}. \\tag{1}\n\\]\n\nIt is convenient to introduce the abbreviations (all positive under the intersection condition) \n\\[\nU=d+R+r,\\quad V=d+r-R,\\quad W=d+R-r,\\quad X=R+r-d.\n\\] \nA short computation gives the useful identities \n\\[\nVW=d^2-(R-r)^2,\\qquad UX=(R+r)^2-d^2,\n\\] \nand also \n\\[\nx_0-p_x=-\\frac{(R-r)U}{2d},\\qquad r+x_0=\\frac{VU}{2d},\\qquad \ny_0=\\frac{\\sqrt{V\\,U\\,X\\,W}}{2d}.\n\\] \nSubstituting these into (1) yields \n\\[\np_y=-\\frac{1}{2}\\sqrt{\\frac{V\\,U\\,W}{X}}. \\tag{2}\n\\]\n\n**Step 3 \u2013 The distance \\(PA\\)** \nBecause \\(P\\) is the circumcenter of \\(\\triangle ACD\\) we have \\(PA=PC\\). Hence \n\\[\na^2:=PA^2=PC^2=(p_x+r)^2+p_y^2.\n\\] \nNow \\(p_x+r=\\dfrac{W}{2}+r=\\dfrac{U}{2}\\). Using (2) we get \n\\[\na^2=\\frac{U^2}{4}+\\frac{VUW}{4X}=\\frac{U}{4}\\Bigl(U+\\frac{VW}{X}\\Bigr)\n=\\frac{U}{4}\\cdot\\frac{UX+VW}{X}.\n\\] \nBut \\(UX+VW=\\bigl((R+r)^2-d^2\\bigr)+\\bigl(d^2-(R-r)^2\\bigr)=4Rr\\). Therefore \n\\[\na^2=\\frac{U}{4}\\cdot\\frac{4Rr}{X}=\\frac{U R r}{X}. \\tag{3}\n\\]\n\n**Step 4 \u2013 Points \\(E\\) and \\(F\\) on line \\(AP\\)** \nThe line \\(AP\\) meets \\(\\Omega\\) again at \\(E\\) and \\(\\Gamma\\) again at \\(F\\). \nLet \\(\\mathbf{e}\\) be the unit vector from \\(P\\) to \\(A\\):\u2003\\(\\mathbf{e}=\\dfrac{\\overrightarrow{PA}}{a}\\), so that \\(A=P+a\\mathbf{e}\\). \nIf a line through \\(P\\) meets a circle with centre \\(O\\) and radius \\(\\rho\\) at points whose signed distances from \\(P\\) are \\(s_1,s_2\\), then \\(s_1s_2=PO^2-\\rho^2\\). For \\(\\Omega\\) one point is \\(A\\) with \\(s=a\\); the other is \\(E\\) with \n\\[\ns_E=\\frac{PM^2-r^2}{a}.\n\\] \nSimilarly for \\(\\Gamma\\), \n\\[\ns_F=\\frac{PN^2-R^2}{a}.\n\\]\n\nWe need \\(PM^2\\) and \\(PN^2\\). From the coordinates,\n\\[\nPM^2=p_x^2+p_y^2,\\qquad PN^2=(p_x-d)^2+p_y^2.\n\\] \nUsing \\(a^2=PC^2=(p_x+r)^2+p_y^2\\) one finds (by subtraction) \n\\[\nPM^2=a^2-r(d+R),\\qquad PN^2=a^2-R(d+r). \\tag{4}\n\\] \nConsequently, \n\\[\nPM^2-r^2=a^2-rU,\\qquad PN^2-R^2=a^2-RU,\n\\] \nand therefore \n\\[\ns_E=a-\\frac{rU}{a},\\qquad s_F=a-\\frac{RU}{a}. \\tag{5}\n\\] \nIn a coordinate system with origin \\(P\\) and \\(x\\)-axis along \\(\\mathbf{e}\\), we have \n\\[\nA=(a,0),\\qquad E=(s_E,0),\\qquad F=(s_F,0).\n\\]\n\n**Step 5 \u2013 A rotated coordinate system** \nTake the orthonormal frame with origin \\(P\\), \\(x\\)-axis \\(\\mathbf{e}\\), and \\(y\\)-axis \\(\\mathbf{f}\\) obtained by rotating \\(\\mathbf{e}\\) by \\(90^\\circ\\) counter\u2011clockwise. For any point \\(X\\) its coordinates are \n\\[\nx_X=\\frac{(X-P)\\cdot(A-P)}{a},\\qquad \ny_X=\\frac{\\det\\bigl(A-P,\\;X-P\\bigr)}{a},\n\\] \nwhere \\(\\det((u_1,u_2),(v_1,v_2))=u_1v_2-u_2v_1\\).\n\nIn this frame we already have \n\\[\nP=(0,0),\\quad A=(a,0),\\quad E=(s_E,0),\\quad F=(s_F,0).\n\\] \nWe now compute the coordinates of \\(B\\) and \\(H\\).\n\n**Step 6 \u2013 Coordinates of \\(B\\)** \n\\(B=(x_0,-y_0)\\). Write \\(A-P=(x_0-p_x,\\;y_0-p_y)\\) and \\(B-P=(x_0-p_x,\\;-y_0-p_y)\\). \nThen \n\\[\n\\det(A-P,B-P)=(x_0-p_x)(-y_0-p_y)-(y_0-p_y)(x_0-p_x)=-2y_0(x_0-p_x).\n\\] \nHence \n\\[\nb_y=\\frac{\\det(A-P,B-P)}{a}=-\\frac{2y_0(x_0-p_x)}{a}.\n\\] \nSubstitute \\(x_0-p_x=-\\dfrac{(R-r)U}{2d}\\) and \\(y_0=\\dfrac{\\sqrt{VUXW}}{2d}\\): \n\\[\nb_y=\\frac{(R-r)U}{a}\\cdot\\frac{y_0}{d}\n =\\frac{(R-r)U}{a}\\cdot\\frac{\\sqrt{VUXW}}{2d^2}.\n\\] \nUsing \\(a=\\sqrt{URr/X}\\) from (3) we obtain \n\\[\nb_y=\\frac{(R-r)U\\sqrt{VUXW}}{2d^2}\\cdot\\sqrt{\\frac{X}{URr}}\n =\\frac{(R-r)U X\\sqrt{VW}}{2d^2\\sqrt{Rr}}. \\tag{6}\n\\]\n\n**Step 7 \u2013 Coordinates of \\(H\\) (orthocentre of \\(\\triangle PMN\\))** \nIn the original coordinates, \\(M=(0,0)\\), \\(N=(d,0)\\), \\(P=(p_x,p_y)\\). \nThe altitude from \\(P\\) is the vertical line \\(x=p_x\\). The altitude from \\(M\\) is the line through \\(M\\) perpendicular to \\(PN\\); a direction vector perpendicular to \\(PN=(d-p_x,-p_y)\\) is \\((p_y,d-p_x)\\). Its intersection with \\(x=p_x\\) occurs when \\(t p_y = p_x\\), i.e. \\(t=p_x/p_y\\), giving the \\(y\\)-coordinate \\(t(d-p_x)=p_x(d-p_x)/p_y\\). Hence \n\\[\nH=\\Bigl(p_x,\\;\\frac{p_x(d-p_x)}{p_y}\\Bigr).\n\\] \nTherefore \n\\[\nH-P=\\Bigl(0,\\;\\frac{p_x(d-p_x)-p_y^2}{p_y}\\Bigr)=:(0,\\delta).\n\\] \nWe compute \\(\\delta\\). With \\(p_x=W/2\\), \\(d-p_x=V/2\\) and \\(p_y^2=VUW/(4X)\\), \n\\[\np_x(d-p_x)-p_y^2=\\frac{WV}{4}-\\frac{VUW}{4X}\n =\\frac{WV}{4}\\Bigl(1-\\frac{U}{X}\\Bigr)\n =\\frac{WV}{4}\\cdot\\frac{X-U}{X}.\n\\] \nSince \\(X-U=-2d\\), this becomes \\(-\\dfrac{WVd}{2X}\\). Using \\(p_y=-\\frac12\\sqrt{VUW/X}\\) we get \n\\[\n\\delta=\\frac{-\\frac{WVd}{2X}}{p_y}\n =-\\frac{WVd}{2X}\\cdot\\Bigl(-\\frac{2}{\\sqrt{VUW/X}}\\Bigr)\n =d\\sqrt{\\frac{WV}{UX}}.\n\\] \nNow \n\\[\n\\det(A-P,H-P)=(x_0-p_x)\\delta,\n\\] \nso \n\\[\nh_y=\\frac{(x_0-p_x)\\delta}{a}\n =\\frac{-\\frac{(R-r)U}{2d}\\cdot d\\sqrt{\\frac{WV}{UX}}}{a}\n =-\\frac{(R-r)U}{2a}\\sqrt{\\frac{WV}{UX}}.\n\\] \nInsert \\(a=\\sqrt{URr/X}\\): \n\\[\nh_y=-\\frac{(R-r)U}{2}\\sqrt{\\frac{WV}{UX}}\\cdot\\sqrt{\\frac{X}{URr}}\n =-\\frac{R-r}{2}\\sqrt{\\frac{WV}{Rr}}. \\tag{7}\n\\]\n\n**Step 8 \u2013 A crucial ratio** \nFrom (6) and (7) we obtain \n\\[\n\\frac{h_y}{b_y}=\n\\frac{-\\dfrac{R-r}{2}\\sqrt{\\dfrac{WV}{Rr}}}\n {\\dfrac{(R-r)U X\\sqrt{WV}}{2d^2\\sqrt{Rr}}}\n=-\\frac{d^2}{UX}. \\tag{8}\n\\]\n\n**Step 9 \u2013 Quantities for the circumcircle of \\(\\triangle BEF\\)** \nIn our rotated frame \\(E=(s_E,0)\\), \\(F=(s_F,0)\\). Let \n\\[\nm=\\frac{s_E+s_F}{2}=a-\\frac{(R+r)U}{2a},\\qquad\n\\frac{\\Delta}{2}=\\frac{s_E-s_F}{2}=\\frac{(R-r)U}{2a}. \\tag{9}\n\\] \nThe circumcenter \\(O\\) of \\(\\triangle BEF\\) lies on the perpendicular bisector of \\(EF\\), i.e. on the vertical line \\(x=m\\). Write \\(O=(m,n)\\). The radius \\(R_c\\) satisfies \n\\[\nR_c^2=\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2+n^2.\n\\] \nBecause \\(OB=OE\\) we have \n\\[\n(b_x-m)^2+(b_y-n)^2=\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2+n^2,\n\\] \nwhich simplifies to \n\\[\n(b_x-m)^2+b_y^2-2b_yn=\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2\n\\quad\\Longrightarrow\\quad\nn=\\frac{(b_x-m)^2+b_y^2-(\\Delta/2)^2}{2b_y}. \\tag{10}\n\\]\n\n**Step 10 \u2013 Computation of \\(b_x-m\\)** \nFirst, \\(b_x=\\dfrac{(B-P)\\cdot(A-P)}{a}\\). \nObserve that \n\\[\nb_x-a=\\frac{(B-A)\\cdot(A-P)}{a}\n =\\frac{(0,-2y_0)\\cdot(A-P)}{a}\n =-\\frac{2y_0(y_0-p_y)}{a}.\n\\] \nHence \n\\[\nb_x=a-\\frac{2y_0(y_0-p_y)}{a}.\n\\] \nUsing \\(y_0^2=\\dfrac{VUXW}{4d^2}\\) and \\(y_0p_y=-\\dfrac{VUW}{4d}\\) (the latter follows from \\(p_y=-\\frac12\\sqrt{VUW/X}\\) and \\(y_0=\\sqrt{VUXW}/(2d)\\)), we get \n\\[\ny_0^2-y_0p_y=\\frac{VUW}{4d^2}(X+d)=\\frac{VUW}{4d^2}(R+r),\n\\] \nso that \n\\[\n2y_0(y_0-p_y)=2(y_0^2-y_0p_y)=\\frac{VUW(R+r)}{2d^2}.\n\\] \nTherefore \n\\[\nb_x-m=\\Bigl(a-\\frac{VUW(R+r)}{2a d^2}\\Bigr)\n -\\Bigl(a-\\frac{(R+r)U}{2a}\\Bigr)\n =\\frac{(R+r)U}{2a}\\Bigl(1-\\frac{VW}{d^2}\\Bigr).\n\\] \nBecause \\(VW=d^2-(R-r)^2\\), we have \\(1-\\dfrac{VW}{d^2}=\\dfrac{(R-r)^2}{d^2}\\). Consequently, \n\\[\nb_x-m=\\frac{(R+r)U(R-r)^2}{2a d^2}. \\tag{11}\n\\]\n\n**Step 11 \u2013 The tangency condition** \nThe line through \\(H\\) parallel to \\(AP\\) is, in our rotated frame, the horizontal line \\(y=h_y\\). It is tangent to the circumcircle of \\(\\triangle BEF\\) iff \n\\[\n|n-h_y|=\\sqrt{\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2+n^2}\n\\quad\\Longleftrightarrow\\quad\n-2nh_y+h_y^2=\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2. \\tag{12}\n\\] \nSubstituting \\(n\\) from (10) transforms (12) into \n\\[\n\\frac{h_y}{b_y}\\Bigl((b_x-m)^2+b_y^2-\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2\\Bigr)\n=h_y^2-\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2. \\tag{13}\n\\] \nWe now compute \n\\[\nT:=(b_x-m)^2+b_y^2-\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2.\n\\] \nFrom (11), (6) and (9): \n\\[\n(b_x-m)^2=\\frac{(R+r)^2U^2(R-r)^4}{4a^2d^4}\n =\\frac{U X (R+r)^2 (R-r)^4}{4d^4 R r}, \\\\[4pt]\nb_y^2=\\frac{(R-r)^2U^2X^2 VW}{4d^4 R r}, \\\\[4pt]\n\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2=\\frac{(R-r)^2U^2}{4a^2}\n =\\frac{(R-r)^2U X}{4R r}.\n\\] \nHence \n\\[\nT=\\frac{U X}{4R r}\\Biggl[\n \\frac{(R+r)^2(R-r)^4}{d^4}\n +\\frac{(R-r)^2U X VW}{d^4}\n -(R-r)^2\\Biggr].\n\\] \nFactor \\((R-r)^2\\) inside the brackets: \n\\[\nT=\\frac{U X (R-r)^2}{4R r}\\Biggl[\n \\frac{(R+r)^2(R-r)^2}{d^4}\n +\\frac{U X VW}{d^4}\n -1\\Biggr].\n\\] \nSet \\(A=R+r\\), \\(B=R-r\\). Then \\(U X=A^2-d^2\\) and \\(VW=d^2-B^2\\). The bracket becomes \n\\[\n\\frac{A^2B^2+(A^2-d^2)(d^2-B^2)}{d^4}-1\n=\\frac{d^2(A^2+B^2-d^2)}{d^4}-1\n=\\frac{2(R^2+r^2)-d^2}{d^2}-1\n=2\\,\\frac{R^2+r^2-d^2}{d^2}.\n\\] \nThus \n\\[\nT=\\frac{U X (R-r)^2}{4R r}\\cdot 2\\,\\frac{R^2+r^2-d^2}{d^2}\n =\\frac{U X (R-r)^2 (R^2+r^2-d^2)}{2R r\\,d^2}. \\tag{14}\n\\]\n\nNow compute the left\u2011hand side of (13). Using (8) and (14), \n\\[\n\\frac{h_y}{b_y}\\,T\n=-\\frac{d^2}{U X}\\cdot\n \\frac{U X (R-r)^2 (R^2+r^2-d^2)}{2R r\\,d^2}\n=-\\frac{(R-r)^2 (R^2+r^2-d^2)}{2R r}.\n\\] \nOn the other hand, from (7) and (9) we have \n\\[\nh_y^2=\\frac{(R-r)^2 VW}{4R r}\n =\\frac{(R-r)^2\\bigl(d^2-(R-r)^2\\bigr)}{4R r},\\\\[4pt]\n\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2\n =\\frac{(R-r)^2 U X}{4R r}\n =\\frac{(R-r)^2\\bigl((R+r)^2-d^2\\bigr)}{4R r}.\n\\] \nTherefore \n\\[\nh_y^2-\\Bigl(\\frac{\\Delta}{2}\\Bigr)^2\n=\\frac{(R-r)^2}{4R r}\\Bigl(2d^2-2(R^2+r^2)\\Bigr)\n=\\frac{(R-r)^2 (d^2-R^2-r^2)}{2R r}.\n\\] \nThis equals \\(-\\dfrac{(R-r)^2 (R^2+r^2-d^2)}{2R r}\\), which is exactly \\(\\dfrac{h_y}{b_y}\\,T\\). Hence (13) holds, and consequently (12) is true.\n\nWe have proved that the distance from the centre \\(O\\) of the circumcircle of \\(\\triangle BEF\\) to the line \\(y=h_y\\) equals the radius. Therefore the line through \\(H\\) parallel to \\(AP\\) is tangent to that circle.\n\n\u220e", "average_automatic_rating": 1.0, "human_rating": 7}} {"question": "Let \\mathbb{N} denote the set of positive integers. A function \\( f : \\mathbb{N} \\rightarrow \\mathbb{N} \\) is said to be bonza if \n\\[\nf(a) \\text{ divides } b^a - f(b)^{f(a)}\n\\] \nfor all positive integers \\( a \\) and \\( b \\).\n\nDetermine the smallest real constant \\( c \\) such that \\( f(n) \\leq cn \\) for all bonza functions \\( f \\) and all positive integers \\( n \\).", "problem_idx": "IMO2025-3", "model_prediction": {"proof": "### 1.\u202fPreliminary properties \n\nLet \\(f:\\mathbb{N}\\to\\mathbb{N}\\) be **bonza**, i.e. \n\n\\[\n\\forall a,b\\in\\mathbb{N},\\qquad f(a)\\mid b^{a}-f(b)^{f(a)}.\n\\]\n\n**Lemma 1.**\u202f\\(f(1)=1\\). \n\n*Proof.*\u2003Take \\(a=1\\):\u2003\\(f(1)\\mid b-f(b)^{f(1)}\\) for all \\(b\\). \nTake \\(b=1\\):\u2003\\(f(a)\\mid 1-f(1)^{f(a)}\\) for all \\(a\\). \nIf \\(f(1)>1\\), let \\(p\\) be a prime divisor of \\(f(1)\\). \nFrom \\(b=1\\), with \\(a=p\\) we obtain \\(f(p)\\mid 1-f(1)^{f(p)}\\equiv1\\pmod p\\); hence \\(p\\nmid f(p)\\). \nFrom \\(a=1\\), with \\(b=p\\) we obtain \\(f(1)\\mid p-f(p)^{f(1)}\\). Since \\(p\\mid f(1)\\), it follows that \\(p\\mid f(p)^{f(1)}\\), so \\(p\\mid f(p)\\) \u2013 a contradiction. Thus \\(f(1)=1\\). \u220e \n\n**Lemma 2.**\u202fFor every \\(a\\in\\mathbb{N}\\), \\(f(a)\\mid a^{a}\\). \n\n*Proof.*\u2003Set \\(b=a\\) in the definition:\u2003\\(f(a)\\mid a^{a}-f(a)^{f(a)}\\). \nSince \\(f(a)\\mid f(a)^{f(a)}\\), subtraction gives \\(f(a)\\mid a^{a}\\). \u220e \n\n**Lemma 3.**\u202fIf \\(p\\) is prime then \\(f(p)\\) is a power of \\(p\\). \n\n*Proof.*\u2003By Lemma\u202f2, \\(f(p)\\mid p^{p}\\), so every prime divisor of \\(f(p)\\) must divide \\(p\\). \u220e \n\n**Lemma 4.**\u202fIf a prime \\(p\\) satisfies \\(f(p)>1\\), then for every \\(b\\in\\mathbb{N}\\), \n\n\\[\nf(b)\\equiv b\\pmod p.\n\\]\n\n*Proof.*\u2003Write \\(f(p)=p^{t}\\) with \\(t\\ge1\\). The bonza condition with \\(a=p\\) yields \n\n\\[\np^{t}\\mid b^{p}-f(b)^{p^{t}}.\n\\]\n\nReduce modulo \\(p\\). By Fermat, \\(b^{p}\\equiv b\\pmod p\\). Also \\(f(b)^{p^{t}}\\equiv f(b)\\pmod p\\) because \\(x^{p^{t}}\\equiv x\\pmod p\\) (repeated application of Fermat). Hence \\(b\\equiv f(b)\\pmod p\\). \u220e \n\n**Remark.**\u202fFor \\(p=2\\) the same reasoning works modulo\u202f2: the divisibility implies that \\(b^{2}-f(b)^{f(2)}\\) is even, and parity gives \\(b\\equiv f(b)\\pmod2\\).\n\n### 2.\u202fThe set \\(P\\) \n\nDefine \n\n\\[\nP=\\{p\\text{ prime}:f(p)>1\\}.\n\\]\n\n**Lemma 5.**\u202fIf \\(p\\in P\\) and \\(q\\notin P\\) (with \\(q\\) prime), then \\(q\\equiv1\\pmod p\\). \n\n*Proof.*\u2003Since \\(q\\notin P\\), \\(f(q)=1\\). By Lemma\u202f4, \\(f(q)\\equiv q\\pmod p\\); thus \\(1\\equiv q\\pmod p\\). \u220e \n\nWe now analyse the possible forms of \\(P\\).\n\n### 3.\u202fCase\u202f\\(P=\\varnothing\\) \n\nThen \\(f(p)=1\\) for every prime \\(p\\). For any fixed \\(a\\) and any prime \\(p\\), take \\(b=p\\) in the definition: \n\n\\[\nf(a)\\mid p^{a}-f(p)^{f(a)}=p^{a}-1.\n\\]\n\nHence \\(f(a)\\) divides \\(p^{a}-1\\) for **all** primes \\(p\\). \n\nIf \\(d>1\\) divided all numbers \\(p^{a}-1\\), let \\(r\\) be a prime divisor of \\(d\\). Choosing \\(p=r\\) gives \\(r\\mid r^{a}-1\\). But \\(r^{a}\\equiv0\\pmod r\\), so \\(r^{a}-1\\equiv-1\\pmod r\\), impossible. Therefore the greatest common divisor of the set \\(\\{p^{a}-1:\\;p\\text{ prime}\\}\\) is \\(1\\). Consequently \\(f(a)=1\\). \n\nThus in this case \\(f(n)=1\\) for all \\(n\\).\n\n### 4.\u202fCase\u202f\\(P\\) contains an odd prime \n\nLet \\(r\\) be an odd prime with \\(f(r)>1\\).\n\n#### 4.1.\u202f\\(2\\in P\\) and \\(f(2)=2\\) \n\nIf \\(2\\notin P\\), Lemma\u202f5 would give \\(2\\equiv1\\pmod r\\), impossible. Hence \\(2\\in P\\). \nBy Lemma\u202f3, \\(f(2)\\) is a power of \\(2\\) dividing \\(2^{2}=4\\) and greater than\u202f1, so \\(f(2)\\in\\{2,4\\}\\). \nFrom Lemma\u202f4 applied with \\(p=r\\) (odd), we have \\(f(2)\\equiv2\\pmod r\\). \nIf \\(f(2)=4\\), then \\(4\\equiv2\\pmod r\\) forces \\(r\\mid2\\), contradicting \\(r\\) odd. Therefore \\(f(2)=2\\).\n\n#### 4.2.\u202f\\(P\\) is infinite \n\nConsider the numbers \n\n\\[\nN_{k}=r^{2^{k}}+1\\qquad(k\\ge1).\n\\]\n\n* \\(r\\) is odd, so \\(r^{2}\\equiv1\\pmod8\\); by induction \\(r^{2^{k}}\\equiv1\\pmod8\\) for all \\(k\\ge1\\). Hence \\(N_{k}\\equiv2\\pmod8\\), which is not a power of\u202f2 (except for\u202f2 itself, but \\(N_{k}>2\\)). Therefore each \\(N_{k}\\) possesses at least one odd prime divisor.\n\n* Write \\(N_{k}=2\\cdot M_{k}\\). Because \\(2^{k}\\ge2\\), \\(r^{2^{k}}\\) is divisible by \\(r^{2}\\), so \\(r^{2^{k}}\\equiv0\\pmod r\\) and \\(N_{k}\\equiv1\\pmod r\\).\n\n* Assume that **all** odd prime divisors of \\(N_{k}\\) were congruent to\u202f\\(1\\) modulo\u202f\\(r\\). Then \\(M_{k}\\), being a product of such primes (and possibly the empty product\u202f1), would satisfy \\(M_{k}\\equiv1\\pmod r\\). Consequently \\(N_{k}=2M_{k}\\equiv2\\pmod r\\), contradicting \\(N_{k}\\equiv1\\pmod r\\). Hence for each \\(k\\ge1\\) there exists an odd prime divisor \\(q_{k}\\) of \\(N_{k}\\) with \\(q_{k}\\not\\equiv1\\pmod r\\).\n\n* Since \\(r\\in P\\) and \\(q_{k}\\not\\equiv1\\pmod r\\), Lemma\u202f5 forces \\(q_{k}\\in P\\). Thus every \\(k\\) yields a prime \\(q_{k}\\in P\\).\n\n* The numbers \\(N_{k}\\) are pairwise coprime (any common odd divisor \\(d\\) of \\(N_{i}\\) and \\(N_{j}\\) with \\(i1\\) and for every odd prime \\(p\\) we have \\(f(p)=1\\).\n\n**Lemma 6.**\u202fIf \\(n\\) is odd and \\(n>1\\), then \\(f(n)=1\\). \n\n*Proof.*\u2003Let \\(p\\) be an odd prime dividing \\(n\\) (such exists because \\(n>1\\)). Since \\(p\\notin P\\), \\(f(p)=1\\). For any odd prime \\(q\\) (e.g. \\(q=3\\)) the bonza condition with \\(a=n,\\;b=q\\) gives \n\n\\[\nf(n)\\mid q^{n}-f(q)^{f(n)}=q^{n}-1.\n\\]\n\nIf an odd prime \\(r\\) divided \\(f(n)\\), then choosing \\(q=r\\) would yield \\(r\\mid r^{n}-1\\), i.e. \\(r\\mid -1\\), impossible. Therefore \\(f(n)\\) has no odd prime divisor; it is a power of\u202f2. \n\nFrom Lemma\u202f4 applied to \\(p=2\\in P\\) we have \\(f(n)\\equiv n\\pmod2\\). As \\(n\\) is odd, \\(f(n)\\) is odd. The only odd power of\u202f2 is\u202f1. Thus \\(f(n)=1\\). \u220e \n\nNow consider an even \\(n\\). Write \n\n\\[\nn=2^{k}\\cdot m,\\qquad k\\ge1,\\; m\\text{ odd}.\n\\]\n\n**Lemma 7.**\u202f\\(f(n)\\) is a power of\u202f2. \n\n*Proof.*\u2003Assume an odd prime \\(r\\) divides \\(f(n)\\). By Lemma\u202f2, \\(f(n)\\mid n^{n}\\); hence \\(r\\mid n\\) and \\(r\\) is odd. Consequently \\(r\\notin P\\), so \\(f(r)=1\\). Using \\(a=n,\\;b=r\\) in the definition yields \n\n\\[\nf(n)\\mid r^{n}-1.\n\\]\n\nBecause \\(r\\mid f(n)\\), it follows that \\(r\\mid r^{n}-1\\), i.e. \\(r\\mid -1\\), contradiction. \u220e \n\nThus we may write \\(f(n)=2^{t}\\) with \\(t\\ge0\\) (and \\(t\\ge1\\) for \\(n=2\\) because \\(2\\in P\\)).\n\n**Lemma 8.**\u202fFor every even \\(n\\), \n\n\\[\nv_{2}\\bigl(3^{n}-1\\bigr)=k+2,\\qquad\\text{where }k=v_{2}(n).\n\\]\n\n*Proof.*\u2003First we show by induction that for all \\(k\\ge1\\), \n\n\\[\nv_{2}\\bigl(3^{2^{k}}-1\\bigr)=k+2.\n\\]\n\n* Base \\(k=1\\): \\(3^{2}-1=8\\), \\(v_{2}=3=1+2\\). \n* Inductive step: assume true for \\(k\\). Then \n\n\\[\n3^{2^{k+1}}-1=\\bigl(3^{2^{k}}-1\\bigr)\\bigl(3^{2^{k}}+1\\bigr).\n\\]\n\nBy the induction hypothesis, \\(v_{2}(3^{2^{k}}-1)=k+2\\). Moreover, because \\(3^{2^{k}}\\) is odd and \\(3^{2^{k}}\\equiv1\\pmod8\\) (as any odd square is\u202f1 mod\u202f8), we have \\(3^{2^{k}}+1\\equiv2\\pmod8\\), so \\(v_{2}(3^{2^{k}}+1)=1\\). Hence \n\n\\[\nv_{2}(3^{2^{k+1}}-1)=(k+2)+1=(k+1)+2.\n\\]\n\nNow write \\(n=2^{k}\\cdot m\\) with \\(m\\) odd. Then \n\n\\[\n3^{n}-1=(3^{2^{k}})^{m}-1.\n\\]\n\nFactor \n\n\\[\n(3^{2^{k}})^{m}-1=(3^{2^{k}}-1)\\cdot\\bigl((3^{2^{k}})^{m-1}+(3^{2^{k}})^{m-2}+\\cdots+1\\bigr).\n\\]\n\nThe second factor is a sum of an odd number of odd terms, hence odd. Therefore \n\n\\[\nv_{2}(3^{n}-1)=v_{2}(3^{2^{k}}-1)=k+2.\\qed\n\\]\n\n**Corollary 9.**\u202fFor even \\(n=2^{k}\\cdot m\\) (\\(m\\) odd), \n\n\\[\nf(n)\\le 2^{k+2}=4\\cdot2^{k}\\le 4n.\n\\]\n\n*Proof.*\u2003Take \\(b=3\\) in the bonza condition. Since \\(3\\) is an odd prime, \\(f(3)=1\\), so \n\n\\[\nf(n)\\mid 3^{n}-1.\n\\]\n\nBy Lemmas\u202f7 and\u202f8, \\(f(n)=2^{t}\\) with \\(t\\le k+2\\). Hence \\(f(n)\\le 2^{k+2}=4\\cdot2^{k}\\). Because \\(n=2^{k}\\cdot m\\ge2^{k}\\), we obtain \\(4\\cdot2^{k}\\le4\\cdot2^{k}\\cdot m=4n\\). \u220e \n\n**Remark.**\u202fThe bounds are valid also for \\(n=2\\): here \\(k=1\\), the estimate gives \\(f(2)\\le 2^{3}=8\\); but we already know \\(f(2)\\mid4\\) and \\(f(2)>1\\), so \\(f(2)\\in\\{2,4\\}\\), both satisfy \\(f(2)\\le8\\) and actually \\(f(2)\\le4\\cdot2=8\\). The inequality \\(f(n)\\le4n\\) therefore holds for all even \\(n\\) as well.\n\nCombining with Lemma\u202f6, we have for every \\(n\\) \n\n\\[\nf(n)\\le 4n.\n\\]\n\n### 6.\u202fSharpness \u2013 a bonza function attaining the bound \n\nDefine \\(f:\\mathbb{N}\\to\\mathbb{N}\\) by \n\n\\[\n\\begin{cases}\nf(1)=1;\\\\\nf(n)=1 &\\text{if }n>1\\text{ is odd};\\\\\nf(2)=4;\\\\\nf(n)=2^{v_{2}(n)+2} &\\text{if }n>2\\text{ is even}.\n\\end{cases}\n\\]\n\nWe verify that this \\(f\\) is bonza. \n\nLet \\(a,b\\in\\mathbb{N}\\).\n\n* **\\(a\\) odd.** Then \\(f(a)=1\\) and \\(1\\mid b^{a}-f(b)^{1}\\) trivially.\n\n* **\\(a\\) even.** Write \\(a=2^{k}\\cdot u\\) with \\(u\\) odd, \\(k\\ge1\\). Define \n\n \\[\n e=\\begin{cases}\n 2 &\\text{if }a=2,\\\\\n k+2 &\\text{if }a>2.\n \\end{cases}\n \\]\n Then \\(f(a)=2^{e}\\).\n\n * **\\(b\\) odd.** We must show \\(2^{e}\\mid b^{a}-1\\). \n\n For \\(e=2\\) (i.e. \\(a=2\\)): any odd \\(b\\) satisfies \\(b^{2}\\equiv1\\pmod4\\), so \\(4\\mid b^{2}-1\\). \n\n For \\(e\\ge3\\): we first prove by induction that for any odd \\(x\\) and any \\(e\\ge3\\), \n\n \\[\n x^{2^{e-2}}\\equiv1\\pmod{2^{e}}.\n \\] \n\n - Base \\(e=3\\): \\(x^{2}\\equiv1\\pmod8\\) because \\(x=2t+1\\) gives \\(x^{2}=4t(t+1)+1\\) and \\(t(t+1)\\) is even. \n - Step: if \\(x^{2^{e-2}}=1+2^{e}\\ell\\), then squaring gives \\(x^{2^{e-1}}=1+2^{e+1}\\ell+2^{2e}\\ell^{2}\\equiv1\\pmod{2^{e+1}}\\). \n\n Now \\(a\\) is divisible by \\(2^{k}=2^{e-2}\\) (since for \\(a>2\\) we have \\(e=k+2\\)). Therefore \\(b^{a}=(b^{2^{e-2}})^{u\\cdot2^{k-(e-2)}}=(b^{2^{e-2}})^{\\text{integer}}\\equiv1\\pmod{2^{e}}\\). \n\n * **\\(b\\) even.** Write \\(b=2^{s}\\cdot v\\) with \\(v\\) odd, \\(s\\ge1\\). Define \n\n \\[\n e_{b}=\\begin{cases}\n 2 &\\text{if }b=2,\\\\\n s+2 &\\text{if }b>2.\n \\end{cases}\n \\]\n Then \\(f(b)=2^{e_{b}}\\). We need to prove \n\n \\[\n 2^{e}\\mid b^{a}-2^{e_{b}\\cdot2^{e}}.\n \\]\n\n Both terms are divisible by \\(2^{e}\\) because: \n\n * \\(v_{2}(b^{a})=s\\cdot a\\ge a\\). As shown in Corollary\u202f9, \\(a\\ge e\\) for every even \\(a\\) (the case \\(a=2\\) gives \\(a=2=e\\); for \\(a>2\\) we have \\(e=k+2\\) and \\(a=2^{k}u\\ge2^{k}\\ge k+2=e\\) because either \\(k=1,\\;u\\ge3\\) gives \\(a\\ge6>3=e\\), or \\(k\\ge2\\) gives \\(2^{k}\\ge k+2\\)). Hence \\(s\\cdot a\\ge a\\ge e\\), i.e. \\(2^{e}\\mid b^{a}\\). \n\n * \\(v_{2}\\bigl(2^{e_{b}\\cdot2^{e}}\\bigr)=e_{b}\\cdot2^{e}\\ge e\\) (since \\(e_{b}\\ge2\\) and \\(2^{e}\\ge e\\) for all \\(e\\ge1\\)). \n\n Therefore \\(b^{a}\\) and \\(2^{e_{b}\\cdot2^{e}}\\) are both multiples of \\(2^{e}\\), and so is their difference. \n\nThus \\(f\\) satisfies the bonza condition in all cases.\n\nFor \\(n=4\\) we have \\(v_{2}(4)=2\\), so \\(f(4)=2^{2+2}=16=4\\cdot4\\). Consequently no constant smaller than\u202f4 can satisfy \\(f(n)\\le cn\\) for all bonza functions.\n\n### 7.\u202fConclusion \n\nWe have shown that every bonza function obeys \\(f(n)\\le 4n\\) for all \\(n\\in\\mathbb{N}\\), and that the constant\u202f4 cannot be improved. Hence the smallest real constant with this property is \n\n\\[\n\\boxed{4}.\n\\]", "average_automatic_rating": 1.0, "human_rating": 7}} {"question": "A proper divisor of a positive integer \\( N \\) is a positive divisor of \\( N \\) other than \\( N \\) itself. \nThe infinite sequence \\( a_1, a_2, \\cdots \\) consists of positive integers, each of which has at least three proper divisors. \nFor each \\( n \\geq 1 \\), the integer \\( a_{n+1} \\) is the sum of the three largest proper divisors of \\( a_n \\). \nDetermine all possible values of \\( a_1 \\).", "problem_idx": "IMO2025-4", "model_prediction": {"proof": "**Notation.** For a positive integer \\(N\\) with at least three proper divisors, denote by \\(f(N)\\) the sum of its three largest proper divisors. Let the positive divisors of \\(N\\) be \n\\[\n1 = d_1 < d_2 < d_3 < d_4 < \\cdots < d_k = N.\n\\] \nThe three largest proper divisors are \\(N/d_2,\\ N/d_3,\\ N/d_4\\) (if \\(N\\) has exactly three proper divisors, then \\(d_4 = N\\) and \\(N/d_4 = 1\\)). Hence \n\\[\nf(N) = \\frac{N}{d_2} + \\frac{N}{d_3} + \\frac{N}{d_4}. \\tag{1}\n\\]\n\n---\n\n### 1. Odd numbers are impossible\n\n**Lemma 1.** If \\(N\\) is odd and has at least three proper divisors, then \n\\[\nf(N) < N \\quad \\text{and} \\quad f(N) \\text{ is odd}.\n\\] \nConsequently, no odd number can be the first term of an infinite sequence satisfying the conditions.\n\n*Proof.* Because \\(N\\) is odd, its smallest divisor greater than \\(1\\) is at least \\(3\\). Hence \\(d_2 \\ge 3,\\ d_3 \\ge 5,\\ d_4 \\ge 7\\) (or \\(d_4 = N\\), in which case \\(1/d_4 \\le 1/15\\) for \\(N \\ge 15\\)). In any case \n\\[\n\\frac{1}{d_2}+\\frac{1}{d_3}+\\frac{1}{d_4} \\le \\frac13+\\frac15+\\frac17 < 1,\n\\] \nso \\(f(N) < N\\). All divisors of an odd number are odd, therefore each term \\(N/d_i\\) is odd and \\(f(N)\\) is odd.\n\nIf \\(a_1\\) is odd, then every term remains odd (since \\(f\\) of an odd is odd) and strictly decreases. The smallest odd integer with at least three proper divisors is \\(15\\). A strictly decreasing sequence of positive odd integers must eventually become smaller than \\(15\\), at which point the term cannot have three proper divisors (the only numbers below \\(15\\) with at least three proper divisors are even). Thus the sequence cannot be infinite while keeping the required property. \u220e\n\n---\n\n### 2. Even numbers not divisible by \\(3\\) are impossible\n\n**Lemma 2.** Let \\(N\\) be an even positive integer with \\(3 \\nmid N\\) and possessing at least three proper divisors. Then \n\n* (i) \\(f(N) < N\\). \n* (ii) \\(f(N)\\) is never both even and divisible by \\(3\\). More precisely, \n \u2013 if \\(\\nu_2(N) = 1\\) (i.e., \\(N \\equiv 2 \\pmod 4\\)), then either \\(f(N)\\) is odd, or it is even and \\(3 \\nmid f(N)\\); \n \u2013 if \\(\\nu_2(N) \\ge 2\\) (i.e., \\(4 \\mid N\\)), then \\(f(N)\\) is not divisible by \\(3\\). \n* (iii) No such \\(N\\) can be the first term of an infinite admissible sequence.\n\n*Proof.* Write \\(N = 2^e \\cdot m\\) where \\(e \\ge 1\\), \\(m\\) is odd, and \\(3 \\nmid m\\).\n\n**(i)** The three smallest divisors satisfy \\(d_2 = 2\\), \\(d_3 \\ge 4\\) (if \\(e \\ge 2\\)) or \\(d_3 \\ge 5\\) (if \\(e = 1\\)), and \\(d_4 \\ge 5\\). Hence \n\\[\n\\frac{1}{d_2}+\\frac{1}{d_3}+\\frac{1}{d_4} \\le \\frac12+\\frac14+\\frac15 = \\frac{19}{20} < 1,\n\\] \nso \\(f(N) < N\\).\n\n**(ii)** We distinguish the two cases.\n\n*Case \\(e \\ge 2\\).* Then \\(4 \\mid N\\) and \\(3 \\nmid N\\), therefore the three smallest divisors are \\(d_2 = 2\\), \\(d_3 = 4\\), and \\(d_4\\) is the smallest divisor larger than \\(4\\) (which may be an odd prime factor of \\(m\\) or, if \\(e \\ge 3\\), possibly \\(8\\)). Using (1), \n\\[\nf(N) = \\frac{N}{2} + \\frac{N}{4} + \\frac{N}{d_4}.\n\\] \nWork modulo \\(3\\). Since \\(2^{-1} \\equiv 2 \\pmod 3\\) and \\(4 \\equiv 1 \\pmod 3\\), we have \n\\[\n\\frac{N}{2} \\equiv 2N \\pmod 3,\\quad \\frac{N}{4} \\equiv N \\pmod 3.\n\\] \nThus \\(\\frac{N}{2}+\\frac{N}{4} \\equiv 3N \\equiv 0 \\pmod 3\\), and \n\\[\nf(N) \\equiv \\frac{N}{d_4} \\pmod 3.\n\\] \nBecause \\(d_4\\) is not a multiple of \\(3\\), its inverse modulo \\(3\\) equals \\(d_4\\) itself (since \\(d_4 \\equiv \\pm 1\\)). Hence \n\\[\n\\frac{N}{d_4} \\equiv N d_4 \\pmod 3.\n\\] \nAs neither \\(N\\) nor \\(d_4\\) is divisible by \\(3\\), we get \\(f(N) \\not\\equiv 0 \\pmod 3\\). In particular, \\(f(N)\\) is **not divisible by \\(3\\)**. (Its parity is not needed for the argument.)\n\n*Case \\(e = 1\\).* Then \\(N = 2m\\) with \\(m\\) odd, \\(3 \\nmid m\\). Let \\(p = d_3\\) be the smallest odd divisor of \\(m\\) (so \\(p \\ge 5\\)). Write \\(m = p \\cdot k\\), where \\(k\\) is odd. Then \n\\[\n\\frac{N}{2} = pk \\quad (\\text{odd}),\\qquad \\frac{N}{p} = 2k \\quad (\\text{even}).\n\\] \nThe third smallest divisor \\(d_4\\) is either \\(2p\\) (if \\(2p\\) is smaller than any other divisor larger than \\(p\\)) or an odd divisor \\(q > p\\) with \\(q < 2p\\).\n\n- **Subcase \\(d_4 = 2p\\).** (This includes the situation where \\(N\\) has exactly three proper divisors, because then the divisors are \\(1,2,p,2p\\) and \\(d_4 = 2p = N\\).) Then \n \\[\n \\frac{N}{d_4} = \\frac{N}{2p} = k \\quad (\\text{odd}).\n \\] \n Hence \n \\[\n f(N) = pk + 2k + k = k(p+3).\n \\] \n Since \\(k\\) is odd and \\(p+3\\) is even, \\(f(N)\\) is even. Moreover, \\(p\\) is not divisible by \\(3\\) and \\(k\\) is not divisible by \\(3\\) (because \\(3 \\nmid m = pk\\)), so \\(p+3 \\equiv p \\not\\equiv 0 \\pmod 3\\) and \\(3 \\nmid k\\). Therefore \\(3 \\nmid f(N)\\).\n\n- **Subcase \\(d_4 = q\\) (odd, \\(p < q < 2p\\)).** Then \\(q\\) divides \\(m\\); write \\(m = q \\cdot r\\) with \\(r\\) integer. We have \n \\[\n \\frac{N}{q} = 2r \\quad (\\text{even}).\n \\] \n Hence \n \\[\n f(N) = pk + 2k + 2r = pk + 2(k+r).\n \\] \n The term \\(pk\\) is odd, while \\(2(k+r)\\) is even, so \\(f(N)\\) is odd. (It may or may not be divisible by \\(3\\), but that is irrelevant for the subsequent argument.)\n\nIn both subcases, whenever \\(f(N)\\) is even it is not divisible by \\(3\\). This completes the proof of (ii).\n\n**(iii)** We prove by strong induction on \\(N\\) that every even integer \\(N\\) with \\(3 \\nmid N\\) and with at least three proper divisors cannot start an infinite admissible sequence.\n\n*Base case.* The smallest such number is \\(8\\). Its proper divisors are \\(1,2,4\\); \\(f(8)=7\\), which has only one proper divisor. Hence \\(8\\) fails.\n\n*Inductive step.* Assume the statement holds for all such numbers smaller than \\(N\\) (with \\(N > 8\\)). Consider \\(A = f(N)\\). By (i), \\(A < N\\). We examine three possibilities.\n\n- If \\(A\\) has fewer than three proper divisors, the sequence already fails at the next term.\n- If \\(A\\) is odd, then by Lemma\u202f1 the sequence from \\(A\\) onward cannot be infinite while keeping the required property; therefore \\(N\\) fails.\n- Otherwise, by (ii) \\(A\\) is even and \\(3 \\nmid A\\). If \\(A\\) has fewer than three proper divisors, we are done; otherwise \\(A\\) itself is an even number not divisible by \\(3\\) with at least three proper divisors and \\(A < N\\). By the induction hypothesis, the sequence starting from \\(A\\) fails, so the sequence starting from \\(N\\) fails as well.\n\nIn every case, the sequence beginning with \\(N\\) fails. \u220e\n\n---\n\n### 3. Necessity: \\(a_1\\) is a multiple of \\(6\\)\n\nFrom Lemmas\u202f1 and\u202f2, the only possible candidates for \\(a_1\\) are even numbers that are divisible by \\(3\\). Thus \n\\[\n6 \\mid a_1.\n\\]\n\n---\n\n### 4. Reduction by factors of \\(12\\)\n\nWrite \\(a_1 = 12^k \\cdot L\\), where \\(k \\ge 0\\) is the largest integer such that \\(12^k \\mid a_1\\) (so that \\(L\\) is a positive integer not divisible by \\(12\\)).\n\n**Lemma 3.** If \\(x\\) is a multiple of \\(12\\), then its three smallest divisors greater than \\(1\\) are \\(2,3,4\\). Consequently, \n\\[\nf(x) = \\frac{x}{2} + \\frac{x}{3} + \\frac{x}{4} = \\frac{13}{12}\\,x.\n\\]\n\n*Proof.* Since \\(12 \\mid x\\), the numbers \\(2,3,4\\) are divisors. No integer lies between \\(3\\) and \\(4\\), and any divisor greater than \\(4\\) is at least \\(5\\). Hence \\(d_2=2,\\ d_3=3,\\ d_4=4\\). Formula (1) yields the result. \u220e\n\nApplying Lemma\u202f3 repeatedly as long as the current term is a multiple of \\(12\\): \nFor \\(i = 1,2,\\dots,k\\) we have \n\\[\na_{i+1} = f(a_i) = \\frac{13}{12}\\,a_i,\n\\] \nand a straightforward induction gives \n\\[\na_{k+1} = 13^k \\cdot L. \\tag{2}\n\\] \n(If \\(k = 0\\), then \\(a_{k+1} = a_1 = L\\).) \nAll terms \\(a_1, a_2, \\dots, a_k\\) are multiples of \\(12\\) (hence each certainly has at least three proper divisors).\n\nNow the behaviour of the whole sequence depends solely on \\(L\\).\n\n---\n\n### 5. Classification of \\(L\\)\n\nRecall that \\(L\\) is not divisible by \\(12\\). We consider all possibilities.\n\n#### Case I: \\(L\\) is odd.\nThen \\(a_{k+1} = 13^k L\\) is odd. By Lemma\u202f1 the sequence cannot be infinite (once an odd term appears, the sequence eventually violates the condition). Hence this case is impossible.\n\n#### Case II: \\(L\\) is even but \\(3 \\nmid L\\).\nThen \\(a_{k+1}\\) is even and not divisible by \\(3\\). Lemma\u202f2 shows that such a number cannot belong to an infinite admissible sequence. Thus this case is impossible.\n\n#### Case III: \\(L\\) is divisible by \\(3\\) but not by \\(4\\).\nSince \\(12 \\nmid L\\), the condition \u201cdivisible by \\(3\\) but not by \\(4\\)\u201d forces \\(\\nu_2(L)=1\\) and \\(3 \\mid L\\), i.e., \\(L \\equiv 6 \\pmod{12}\\). Write \\(L = 6t\\) with \\(t\\) odd. We now distinguish two subcases based on whether \\(5\\) divides \\(L\\).\n\n*Subcase IIIa: \\(5 \\mid L\\).* \nThen \\(5\\) is a divisor of \\(L\\). Because \\(\\nu_2(L)=1\\), the number \\(4\\) does not divide \\(L\\). Also \\(5 < 6\\), so the three smallest divisors of \\(L\\) are \\(2, 3, 5\\). Using (1), \n\\[\nf(L) = \\frac{L}{2} + \\frac{L}{3} + \\frac{L}{5} = \\frac{31}{30}\\,L.\n\\] \nSince \\(L = 6t\\) and \\(5 \\mid t\\), we have \\(L/30 = t/5\\), an odd integer (because \\(t\\) and \\(5\\) are odd). Therefore \\(f(L)\\) is odd.\n\nNow consider \\(a = a_{k+1} = 13^k L\\). The factor \\(13^k\\) is odd and not divisible by \\(5\\). Consequently, \\(a\\) is still even with exactly one factor of \\(2\\) (so \\(4 \\nmid a\\)), divisible by \\(3\\) and by \\(5\\), and not divisible by any integer between \\(3\\) and \\(5\\) (since \\(4\\) does not divide). Hence its three smallest divisors are again \\(2, 3, 5\\). Therefore \n\\[\nf(a) = \\frac{a}{2} + \\frac{a}{3} + \\frac{a}{5} = \\frac{31}{30}\\,a.\n\\] \nAs before, \\(a/30 = 13^k \\cdot (t/5)\\) is odd, so \\(f(a)\\) is odd. Thus \\(a_{k+2}\\) is odd, and by Lemma\u202f1 the sequence fails. This subcase is impossible.\n\n*Subcase IIIb: \\(5 \\nmid L\\).* \nSince \\(4 \\nmid L\\) and \\(5 \\nmid L\\), the next divisor after \\(3\\) is \\(6\\) (which certainly divides \\(L\\)). Therefore the three smallest divisors of \\(L\\) are \\(2, 3, 6\\). Then \n\\[\nf(L) = \\frac{L}{2} + \\frac{L}{3} + \\frac{L}{6} = L.\n\\] \nThus \\(L\\) is a **fixed point** of \\(f\\).\n\nNow examine \\(a = 13^k L\\). The exponent of \\(2\\) in \\(a\\) is still \\(1\\) (because \\(L\\) contributes exactly one factor of \\(2\\) and \\(13^k\\) is odd), so \\(4 \\nmid a\\). The number \\(a\\) is divisible by \\(3\\) (since \\(L\\) is) and not by \\(5\\). Moreover, the only possible divisors smaller than \\(6\\) are \\(2,3,4,5\\). Among these, \\(2\\) and \\(3\\) divide \\(a\\); \\(4\\) does not (as \\(\\nu_2(a)=1\\)); \\(5\\) does not (since \\(5 \\nmid L\\) and \\(13^k\\) is not a multiple of \\(5\\)). Hence the three smallest divisors of \\(a\\) are exactly \\(2, 3, 6\\). Consequently, \n\\[\nf(a) = \\frac{a}{2} + \\frac{a}{3} + \\frac{a}{6} = a.\n\\] \nSo \\(a\\) is also a fixed point.\n\nOnce the sequence reaches a fixed point, it stays there forever. All earlier terms \\(a_1, \\dots, a_{k+1}\\) have at least three proper divisors (the first \\(k\\) terms are multiples of \\(12\\); \\(a_{k+1}\\) is a fixed point and clearly has proper divisors \\(1,2,3,6,\\dots\\)). Therefore the sequence is infinite and satisfies the required property.\n\n---\n\n### 6. Final characterisation\n\nCombining the results, \\(a_1\\) is admissible **iff** when we write \\(a_1 = 12^k \\cdot L\\) with \\(L\\) not divisible by \\(12\\), we have \n\n- \\(L \\equiv 6 \\pmod{12}\\) (i.e., \\(L = 6t\\) with \\(t\\) odd), and \n- \\(5 \\nmid L\\).\n\nEquivalently, \n\\[\n\\boxed{a_1 = 6 \\cdot 12^{k} \\cdot t \\qquad (k \\ge 0,\\ t\\ \\text{odd},\\ 5 \\nmid t)}.\n\\]\n\nAll such numbers indeed work, as shown in Subcase\u202fIIIb, and no other numbers can work because they lead to a failure via one of the previous cases.\n\n---", "average_automatic_rating": 1.0, "human_rating": 7}} {"question": "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:\n\n- If \\(n\\) is odd, Alice chooses a nonnegative real number \\(x_n\\) such that \n \\[\n x_1 + x_2 + \\cdots + x_n \\leq \\lambda n.\n \\]\n\n- If \\(n\\) is even, Bazza chooses a nonnegative real number \\(x_n\\) such that \n \\[\n x_1^2 + x_2^2 + \\cdots + x_n^2 \\leq n.\n \\]\n\nIf 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.\n\nDetermine all values of \\(\\lambda\\) for which Alice has a winning strategy and all those for which Bazza has a winning strategy.", "problem_idx": "IMO2025-5", "model_prediction": {"proof": "**Notation.** \nFor each \\(n\\) let \\(S_n = \\sum_{i=1}^n x_i\\) and \\(Q_n = \\sum_{i=1}^n x_i^2\\). \nAfter an odd turn \\(n\\) we have \\(S_n \\le \\lambda n\\); after an even turn \\(n\\) we have \\(Q_n \\le n\\). \nA player can move on turn \\(n\\) iff the corresponding cumulative *before* the move does not exceed the bound (they may choose \\(0\\)). \nThus Alice can move on odd \\(n\\) iff \\(S_{n-1} \\le \\lambda n\\); Bazza can move on even \\(n\\) iff \\(Q_{n-1} \\le n\\).\n\nA basic tool is the Cauchy\u2013Schwarz inequality: \n\\[\nS_n^2 \\le n\\, Q_n .\n\\]\n\n---\n\n### 1. \\(\\lambda < \\dfrac{\\sqrt2}{2}\\) : Bazza has a winning strategy \n\n**Bazza\u2019s strategy.** \nOn every even turn \\(2k\\) he chooses the maximal possible number \n\\[\nx_{2k} = \\sqrt{2k - Q_{2k-1}} .\n\\]\n\nWe prove by induction on \\(k\\) that after turn \\(2k\\) the following hold: \n\n* \\((i)\\) \\(Q_{2k}=2k\\), \n* \\((ii)\\) \\(S_{2k} \\ge k\\sqrt2\\).\n\n**Base \\(k=0\\).** \\(Q_0=0\\), \\(S_0=0\\) \u2013 both true.\n\n**Inductive step.** Assume \\((i),(ii)\\) for \\(k=m\\). \nConsider turn \\(2m+1\\) (Alice). She picks some \\(x\\ge0\\) with \n\\[\nS_{2m}+x \\le \\lambda(2m+1).\n\\tag{A}\n\\]\nThen \n\\[\nQ_{2m+1}=Q_{2m}+x^2 = 2m + x^2 .\n\\]\n\nBecause \\(\\lambda<\\sqrt2/2\\) and by \\((ii)\\) \\(S_{2m}\\ge m\\sqrt2\\), we obtain \n\\[\nx \\le \\lambda(2m+1)-S_{2m} \\le \\frac{\\sqrt2}{2}(2m+1)-m\\sqrt2 = \\frac{\\sqrt2}{2}.\n\\]\nHence \\(x^2\\le 1/2<2\\), and therefore \\(Q_{2m+1}\\le 2m+2\\). In particular the radicand in Bazza\u2019s next move will be non\u2011negative.\n\nTurn \\(2m+2\\) (Bazza). He plays \\(b = \\sqrt{2m+2 - Q_{2m+1}}\\). Then \n\\[\nQ_{2m+2}=Q_{2m+1}+b^2 = 2m+2 ,\n\\]\nwhich gives \\((i)\\) for \\(k=m+1\\).\n\nNow compute the sum: \n\\[\nS_{2m+2}=S_{2m+1}+b = (S_{2m}+x)+\\sqrt{2m+2-Q_{2m+1}}.\n\\]\nSince \\(Q_{2m+1}=2m+x^2\\), we have \\(2m+2-Q_{2m+1}=2-x^2\\), so \\(b=\\sqrt{2-x^2}\\). Hence \n\\[\nS_{2m+2}=S_{2m}+x+\\sqrt{2-x^2}.\n\\]\nFor any \\(x\\ge0\\) the function \\(f(x)=x+\\sqrt{2-x^2}\\) satisfies \\(f(x)\\ge \\sqrt2\\) (minimum attained at \\(x=0\\) and \\(x=\\sqrt2\\)). Thus \n\\[\nS_{2m+2} \\ge S_{2m} + \\sqrt2 \\ge m\\sqrt2+\\sqrt2 = (m+1)\\sqrt2,\n\\]\nwhich proves \\((ii)\\) for \\(k=m+1\\). The induction is complete.\n\n**Why Bazza wins.** \nFrom \\((ii)\\) we have \\(S_{2k}\\ge k\\sqrt2\\). Alice can move on turn \\(2k+1\\) only if \\(S_{2k}\\le\\lambda(2k+1)\\). Because \\(\\lambda<\\sqrt2/2\\) we have \\(2\\lambda<\\sqrt2\\), and therefore for sufficiently large \\(k\\) \n\\[\nk\\sqrt2 \\;>\\; \\lambda(2k+1).\n\\]\nFor such a \\(k\\), even choosing \\(x_{2k+1}=0\\) would give \\(S_{2k+1}=S_{2k}>\\lambda(2k+1)\\), i.e. Alice has no legal move. Hence Alice loses and Bazza wins. \n\nThus for every \\(\\lambda<\\sqrt2/2\\) Bazza possesses a winning strategy.\n\n---\n\n### 2. \\(\\lambda > \\dfrac{\\sqrt2}{2}\\) : Alice has a winning strategy \n\n**Alice\u2019s strategy.** \nShe divides her play into two phases. \n\n*Phase 1 (waiting).* On each odd turn she plays \\(x=0\\), **unless** at the beginning of that turn (say turn \\(2k-1\\)) the following holds: \n\\[\n\\bigl(\\lambda(2k-1)-S_{2k-2}\\bigr)^2 \\;>\\; 2k - Q_{2k-2}. \\tag{\u2605}\n\\]\n\n*Phase 2 (winning move).* At the first odd turn where (\u2605) is satisfied she chooses \n\\[\nx_{2k-1} = \\lambda(2k-1)-S_{2k-2}\n\\]\n(the maximum allowed by her constraint). Then \n\\[\nQ_{2k-1}=Q_{2k-2}+\\bigl(\\lambda(2k-1)-S_{2k-2}\\bigr)^2 > 2k,\n\\]\nso Bazza on turn \\(2k\\) cannot find any \\(x_{2k}\\ge0\\) with \\(Q_{2k-1}+x_{2k}^2\\le 2k\\); he loses immediately.\n\nWe must show that Phase\u202f1 terminates and that Alice never gets stuck during it.\n\n**Analysis while Alice plays 0.** \nDuring Phase\u202f1 all contributions come from Bazza\u2019s moves. After an even turn \\(2m\\) let the numbers chosen by Bazza be \\(b_1,\\dots,b_m\\). Then \n\\[\nS_{2m}=\\sum_{i=1}^m b_i,\\qquad Q_{2m}=\\sum_{i=1}^m b_i^2.\n\\]\nBecause each \\(b_i\\) respects the constraint \\(Q_{2i}\\le 2i\\), we have \\(Q_{2m}\\le 2m\\). \nCauchy\u2013Schwarz applied to the \\(b_i\\)\u2019s gives \n\\[\nS_{2m}^2 \\le m\\,Q_{2m} \\le m\\cdot 2m = 2m^2 \\quad\\Longrightarrow\\quad S_{2m}\\le \\sqrt2\\,m. \\tag{1}\n\\]\n\nNow consider the slack before Alice\u2019s turn \\(2m+1\\): \n\\[\nL_m := \\lambda(2m+1)-S_{2m}.\n\\]\nUsing (1) we obtain \n\\[\nL_m \\ge \\lambda(2m+1)-\\sqrt2\\,m = m(2\\lambda-\\sqrt2)+\\lambda.\n\\]\nSince \\(\\lambda>\\sqrt2/2\\), we have \\(\\delta:=2\\lambda-\\sqrt2>0\\); hence \\(L_m\\ge \\delta m+\\lambda\\to\\infty\\) as \\(m\\to\\infty\\). Consequently \\(L_m^2\\) grows at least like \\(\\delta^2 m^2\\).\n\nThe right\u2011hand side of (\u2605) for the turn following \\(2m\\) is \\(2m+2-Q_{2m}\\), which is at most \\(2m+2\\) (because \\(Q_{2m}\\ge0\\)). Therefore there exists an integer \\(M\\) such that for all \\(m\\ge M\\) \n\\[\nL_m^2 > 2m+2 \\ge 2m+2 - Q_{2m},\n\\]\ni.e. condition (\u2605) holds at turn \\(2m+1\\). Thus Phase\u202f1 ends after finitely many steps.\n\n**Alice never loses during Phase\u202f1.** \nFor Alice to be able to play \\(0\\) on turn \\(2m+1\\) we need \\(S_{2m}\\le \\lambda(2m+1)\\). From (1) we have \\(S_{2m}\\le\\sqrt2\\,m\\). Because \\(\\lambda\\ge\\sqrt2/2\\), \n\\[\n\\sqrt2\\,m \\;\\le\\; \\lambda(2m+1)\n\\]\nholds for every \\(m\\) (the inequality is equivalent to \\(\\lambda \\ge \\frac{\\sqrt2\\,m}{2m+1}\\), and the right\u2011hand side is always \\(<\\sqrt2/2\\)). Hence the required condition is always satisfied.\n\nThus Alice\u2019s strategy is well defined and guarantees her victory for every \\(\\lambda>\\sqrt2/2\\).\n\n---\n\n### 3. \\(\\lambda = \\dfrac{\\sqrt2}{2}\\) : Neither player has a winning strategy \n\nWe exhibit a strategy for each player that avoids losing, proving that the opponent cannot force a win.\n\n*Alice avoids losing.* \nShe always plays \\(x=0\\) on her turns. As shown above, this yields \\(S_{2m}\\le\\sqrt2\\,m\\). The condition for her to move on turn \\(2m+1\\) becomes \n\\[\n\\sqrt2\\,m \\;\\le\\; \\frac{\\sqrt2}{2}(2m+1) = \\sqrt2\\,m + \\frac{\\sqrt2}{2},\n\\]\nwhich is true for all \\(m\\). Hence she never gets stuck.\n\n*Bazza avoids losing.* \nHe adopts the same greedy strategy as in Case\u202f1: on turn \\(2k\\) set \\(x_{2k}=\\sqrt{2k-Q_{2k-1}}\\). \nExactly the same inductive proof (now with \\(\\lambda=\\sqrt2/2\\)) shows that for all \\(k\\):\n- \\(Q_{2k}=2k\\),\n- \\(S_{2k}\\ge k\\sqrt2\\),\n- every Alice move satisfies \\(x\\le \\sqrt2/2\\) (because \\(x\\le \\lambda(2k-1)-S_{2k-2}\\le \\sqrt2/2\\)).\n\nConsequently \\(x^2\\le 1/2<2\\), so Alice can never make \\(Q_{2k-1}>2k\\); thus Bazza always has a legal move and never loses. Moreover, because Alice can keep playing \\(0\\), Bazza cannot force her loss either.\n\nSince each player possesses a strategy that guarantees at least a draw (i.e. prevents the opponent from winning), neither has a winning strategy when \\(\\lambda=\\sqrt2/2\\).\n\n---\n\n**Conclusion.** \n\\[\n\\begin{array}{c|c}\n\\lambda<\\dfrac{\\sqrt2}{2} & \\text{Bazza has a winning strategy} \\\\[4pt]\n\\lambda=\\dfrac{\\sqrt2}{2} & \\text{neither player has a winning strategy} \\\\[4pt]\n\\lambda>\\dfrac{\\sqrt2}{2} & \\text{Alice has a winning strategy}\n\\end{array}\n\\]\n\n---", "average_automatic_rating": 1.0, "human_rating": 7}} {"question": "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. \nDetermine 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.", "problem_idx": "IMO2025-6", "model_prediction": {"proof": "Let \\(n = 2025\\). The condition that each row and each column contains exactly one uncovered square implies that the uncovered squares form a **permutation matrix**: there is exactly one uncovered cell in every row and every column. Denote the uncovered square in row \\(i\\) by \\((i,\\pi(i))\\) where \\(\\pi\\) is a permutation of \\(\\{1,\\dots,n\\}\\).\n\n---\n\n### 1. Reduction to the diagonal case \n\nThe board is geometrically symmetric under any renaming of the columns \u2013 the physical arrangement of rows and columns remains unchanged. Given a valid placement of tiles for a particular choice of holes \\(\\{(i,\\pi(i))\\}\\), we relabel the columns by applying the bijection \\(\\pi^{-1}\\). Under this relabelling, the hole in row \\(i\\) becomes \\((i,\\pi^{-1}(\\pi(i))) = (i,i)\\). The tiles themselves still cover exactly the same physical squares; their sides still lie on the same grid lines, so they remain rectangles. The condition \u201ceach row and each column has exactly one uncovered square\u201d continues to hold because we have merely renamed the columns. Consequently, the number of tiles needed for the configuration with holes \\((i,\\pi(i))\\) is the same as the number needed for the configuration with holes \\((i,i)\\). Hence the minimum number of tiles over all possible choices of uncovered squares is equal to the minimum number required when the holes are exactly the diagonal cells \\((i,i)\\) for \\(i=1,\\dots,n\\). It therefore suffices to solve the problem for the diagonal arrangement.\n\n---\n\n### 2. Upper bound \u2013 a construction with \\(2n-2\\) tiles \n\nFor the diagonal holes \\((i,i)\\), cover all off\u2011diagonal cells with the following \\(2n-2\\) disjoint rectangles:\n\n* For each \\(i = 1,2,\\dots,n-1\\): a **horizontal** tile covering row \\(i\\) and columns \\(i+1,i+2,\\dots,n\\). \n This is a \\(1 \\times (n-i)\\) rectangle that contains all cells to the right of the hole in row \\(i\\).\n* For each \\(j = 1,2,\\dots,n-1\\): a **vertical** tile covering column \\(j\\) and rows \\(j+1,j+2,\\dots,n\\). \n This is an \\((n-j) \\times 1\\) rectangle that contains all cells below the hole in column \\(j\\).\n\nThese tiles are pairwise disjoint. Indeed, take any cell \\((i,j)\\) with \\(i \\ne j\\). \n* If \\(i < j\\), then the cell lies in the horizontal tile of row \\(i\\) (because \\(j \\ge i+1\\)) but not in any vertical tile (vertical tiles for column \\(j\\) start at row \\(j+1 > i\\)). \n* If \\(i > j\\), then the cell lies in the vertical tile of column \\(j\\) (because \\(i \\ge j+1\\)) but not in any horizontal tile (horizontal tiles for row \\(i\\) start at column \\(i+1 > j\\)).\n\nEvery off\u2011diagonal cell is covered exactly once, and the diagonal cells remain uncovered. Thus \\(2n-2\\) tiles suffice. For \\(n = 2025\\) this gives an upper bound of \\(2\\cdot2025-2 = 4048\\).\n\n---\n\n### 3. Lower bound \u2013 at least \\(2n-2\\) tiles are necessary \n\nWe now prove that even with the most favourable choice of holes (the diagonal), no tiling can use fewer than \\(2n-2\\) rectangles.\n\nDefine two sets of cells that must be covered:\n\n\\[\nA = \\{\\, (i,i+1) \\mid 1 \\le i \\le n-1 \\,\\},\\qquad\nB = \\{\\, (i+1,i) \\mid 1 \\le i \\le n-1 \\,\\}.\n\\]\n\n\\(A\\) consists of the cells immediately to the right of the holes, \\(B\\) of those immediately below the holes. There are exactly \\(2n-2\\) such cells, and each must be covered because every row (resp. column) has exactly one uncovered cell.\n\nWe show that **no single tile can contain two distinct cells from \\(A \\cup B\\)**.\n\n*Case 1: Two cells from \\(A\\).* \nSuppose a tile contains \\((i,i+1)\\) and \\((j,j+1)\\) with \\(i < j\\). Since a tile\u2019s columns form an interval that contains both \\(i+1\\) and \\(j+1\\), it must contain every integer between them, in particular column \\(j\\). The tile also contains row \\(j\\) (because it contains \\((j,j+1)\\)). Hence the tile would cover \\((j,j)\\), which is a hole \u2013 a contradiction. The same argument works if \\(i > j\\); therefore a tile can contain at most one cell of \\(A\\).\n\n*Case 2: Two cells from \\(B\\).* \nA symmetric argument (interchanging rows and columns) shows that a tile can contain at most one cell of \\(B\\).\n\n*Case 3: One cell from \\(A\\) and one from \\(B\\).* \nAssume a tile contains \\((i,i+1) \\in A\\) and \\((j+1,j) \\in B\\). \nIf \\(i \\le j\\), then the tile\u2019s rows contain \\(i\\) and \\(j+1\\), so they contain every row between, in particular row \\(j\\). Its columns contain \\(i+1\\) and \\(j\\), so they contain every column between, in particular column \\(j\\). Consequently the tile would cover \\((j,j)\\), a hole. \nIf \\(i > j\\), the same reasoning yields that the tile would cover \\((i,i)\\), again a contradiction. Hence a tile cannot contain one cell from \\(A\\) and one from \\(B\\).\n\nThus every tile covers at most one of the \\(2n-2\\) distinguished cells. Since all of them must be covered, at least \\(2n-2\\) tiles are required.\n\n---\n\n### 4. Conclusion \n\nThe construction shows that \\(2n-2\\) tiles are sufficient, and the lower bound shows that they are necessary. Therefore the minimum number of tiles Matilda needs is exactly \\(2n-2\\). \n\nFor \\(n = 2025\\) the answer is \n\n\\[\n\\boxed{4048}.\n\\]", "average_automatic_rating": 1.0, "human_rating": 0}}