{ "problem": "Let $n$ be a positive integer that has a remainder of 6 when divided by 7. Let $d$ be any divisor of $n$.\n\nDefine $c$ such that when the expression $\\left(d+\\frac{n}{d}\\right)^{2}$ is divided by $n$, the remainder is $n-c$.\n\nWhat is the smallest possible value of $c$ among all $d$ and $n$ satisfying the conditions above?\n\n(Note that the remainder when a positive integer $a$ is divided by a positive integer $b$ is the value of $r$ in the expression $a=b q+r, 0 \\leq r \\leq b-1$.)", "solution": " Understanding the problem situation\n\n Let $d=a, \\frac{n}{d}=b$, then $n=a b$. So if the remainder when $(a+b)^{2}$ is divided by $n$ is $n-c$ (where $c \\geq 1$), then\n\n \\[\n -c \\equiv(a+b)^{2}=a^{2}+b^{2}+2 a b \\equiv a^{2}+b^{2}(\\bmod n)\n \\]\n\n which implies that $\\frac{a^{2}+b^{2}+c}{a b}$ must be a positive integer.\n\n First, if $c=3$, then setting $a=4, b=19$ gives\n\n \\[\n \\frac{4^{2}+19^{2}+3}{4 \\cdot 19}=5\n \\]\n\n which is an integer. In fact, this corresponds to the case when $n=76, d=4$, and $\\left(4+\\frac{76}{4}\\right)^{2}=529 \\equiv -3(\\bmod 76)$.\n\n Therefore, if $c \\leq 2$, it is sufficient to prove that when $\\frac{a^{2}+b^{2}+c}{a b}$ is a positive integer, $n$ cannot have remainder 6 when divided by $7$. Now, let's assume that $c$ is 1 or 2.\n\n Vieta jumping\n\n First, let's find the solutions when $a=b$. Then $\\frac{2 a^{2}+c}{a^{2}}$ must be a positive integer, so $a^{2} \\mid c$. Since $c$ is 1 or 2, we know that $a=1$. Therefore, $(a, b)=(1,1)$ is the only solution in this case. Now, let's find the solutions when $a \\neq b$. By symmetry, we can assume $a We need to find pairs $(a, b)$ that satisfy the following for some positive integer $k$:\n\n\n \\begin{equation*}\n \\frac{a^{2}+b^{2}+c}{a b}=k \\tag{1.1}\n \\end{equation*}\n\n\n The above equation (1.1) can be rewritten as:\n\n \\[\n a^{2}-k a b+b^{2}+c=0\n \\]\n\n Now, if we view this equation as a quadratic equation in $b$, we can observe the following facts from the relationship between roots and coefficients:\n\n (1) The sum of the two roots is $k a$, so if a positive integer $b$ is a root, then the other root is $k a-b$, which is also an integer.\n\n (2) The product of the two roots is $a^{2}+c$, so if a positive integer $b$ is a root, then $\\frac{a^{2}+c}{b}$ is also a root, and by (1), it is a positive integer solution.\n\n (2) Therefore, if $(a, b)$ is a solution to (1.1), then\n\n\n \\begin{equation*}\n \\left(a^{\\prime}, b^{\\prime}\\right)=\\left(\\frac{a^{2}+c}{b}, a\\right)=(k a-b, a) \\tag{1.2}\n \\end{equation*}\n\n\n defined as above is also a solution to (1.1).\n\n This process gives us a way to find another solution if we have a solution $(a, b)$.\n\n Applying the method of infinite descent\n\n Suppose $(a, b)$ is a solution to (1.1) with $a .\n\n Since we assumed $aa^{2}+2 \\geq a^{2}+c\n \\]\n\n so $\\frac{a^{2}+c}{b}, the sum of the two numbers forming the solution always decreases by at least 1.\n\n If $\\frac{a^{2}+c}{b} again to the new solution $\\left(a^{\\prime}, b^{\\prime}\\right)=\\left(\\frac{a^{2}+c}{b}, a\\right)$ to obtain another solution. However, by the result in (1) and the principle of infinite descent, this process cannot be repeated infinitely, and we will eventually reach a solution $(a, b)$ that satisfies $\\frac{a^{2}+c}{b} \\geq a$.\n\n Let's find what the final solution we must reach in (2) is. If $aa$ and $c+1=2or3$ so $b=c+1$.\n\n Therefore, this process ends when $(1, c+1)$ becomes $\\left(\\frac{1^{2}+c}{c+1}, 1\\right)=(1,1)$.\n\n Summarizing the above discussion, if $(a, b)$ is a solution to (1.1) with $a is a new solution satisfying $a^{\\prime} Reversing the descent process\n\n First, the value of $k$ in (1.1) does not change during the process described in . Therefore, the value of $k$ must be the same as the value at the endpoint $(a, b)=(1,1)$ of this process, so\n\n \\[\n k=\\frac{1^{2}+1^{2}+1}{c \\cdot 1}=c+2\n \\]\n\n must hold.\n\n Now, we know that any solution $(a, b)$ to (1.1) with $a . Therefore, by reversing this process, we can find all solutions $(a, b)$ to (1.1) with $a On the other hand, from (1), $k=c+2$, so looking at (1.2), we see that $\\left(a^{\\prime}, b^{\\prime}\\right)=((c+2) a-b, a)$. Therefore,\n\n \\[\n (a, b)=\\left(b^{\\prime},(c+2) b^{\\prime}-a^{\\prime}\\right)\n \\]\n\n holds. In other words, the process of mapping $(x, y) \\mapsto(y,(c+2) y-x)$ is the reverse of the process where the solution descends in .\n\n Therefore, by (3), if we define the sequence $\\left(x_{n}, y_{n}\\right)_{n=1}^{\\infty}$ as $\\left(x_{1}, y_{1}\\right)=(1,1)$ and\n\n \\begin{equation} \\tag{1.3}\n \\left\\{\\begin{array}{l}\n x_{n+1}=y_{n}\n\n y_{n+1}=(c+2) y_{n}-x_{n}\n \\end{array}\\right.\n \\end{equation}\n\n then this sequence describes the reverse of the process where the solution descends in , and by (2), these $\\left(x_{n}, y_{n}\\right)$ with $n \\geq 2$ are all solutions to (1.1) with $a is\n\n \\[\n \\left(x_{k}, y_{k}\\right) \\rightarrow\\left(x_{k-1}, y_{k-1}\\right) \\rightarrow \\cdots \\rightarrow\\left(x_{1}, y_{1}\\right)=(1,1)\n \\]\n\n \n\n (Case 1) When $c=1$, substituting the first equation of (1.3) into the second equation gives the recurrence relation\n\n \\[\n y_{n+1}=3 y_{n}-y_{n-1}\n \\]\n\n and using $y_{1}=1, y_{2}=2$, we can see that this sequence repeats as $1,2,5,6,6,5,2,1,1,2$ modulo 7. Therefore, $x_n y_{n} = y_n y_{n-1}$ repeats as $2,3,2,1,2,3,2,1$ and thus cannot have remainder 6 when devided by $7$.\n\n (Case 2) When $c=2$, substituting the first equation of (1.3) into the second equation gives the recurrence relation\n\n \\[\n y_{n+1}=4 y_{n}-y_{n-1}\n \\]\n\n and using $y_{1}=1, y_{2}=3$, we can see that this sequence repeats as $1,3,4,6,6,4,3,1,1,3$ modulo 7. Therefore, $x_n y_{n} = y_n y_{n-1}$ repeats as $3,5,3,1,3,5,3,1$ and thus cannot have remainder 6 when divided by $7$.\n\n In conclusion, when $c=1,2$, there is no case where $ab$ has remainder $6$ when divided by $7$ and $\\frac{a^{2}+b^{2}+c}{a b}$ is an integer. Therefore, $c=3$ is the smallest possible value.", "grading_guidelines": "(Partial)\n 1. Proved $c\\ge 3$.\n(Almost)\n 1. Applied infinite descent or equivalent strategy to prove $c=3$, but not completed.", "problem_id": "PB-Advanced-017", "level": "advanced", "category": "Number theory", "source": "Novel Problem", "max_score": 7, "difficulty": "IMO-easy", "short_answer": "3" }