Maths Olympiad Prep

Library / /7 of 45

, 2009

Number theory Difficulty 8.1 Shortlist Prove it United States

Find all pairs of positive integers (m,n)(m, n) such that mn1mn - 1 divides (n2n+1)2(n^2 - n + 1)^2.

Solutions — 2

Solution 1

Solution 1 (Based on the work of John Berman). The answer is (m,n)=(2,2)(m, n) = (2, 2) or (m,n)=(t2±2t+2,t2+1)(m, n) = (t^2 \pm 2t + 2, t^2 + 1) for some t0t \ge 0.
We first check that these pairs work: 221=332=(222+1)22 \cdot 2 - 1 = 3 \mid 3^2 = (2^2 - 2 + 1)^2 and
(t2±2t+2)(t2+1)1=(t2±t+1)2(t4+t2+1)2=((t2+1)2(t2+1)+1)2. (t^2 \pm 2t + 2)(t^2 + 1) - 1 = (t^2 \pm t + 1)^2 \mid (t^4 + t^2 + 1)^2 = ((t^2 + 1)^2 - (t^2 + 1) + 1)^2.
We now wish to show that these are the only solutions. First, notice that if n=1n = 1 or n=2n = 2, we have m11m - 1 \mid 1 or 2m192m - 1 \mid 9, respectively, so it is easy to verify that the only solutions are of the claimed form. From now on, we assume that n2n \ge 2. Suppose that (m,n)(m, n) is a solution. Then, notice that
m2(n2n+1)2n2(m2m+1)2=(mn2m2n+mn)(mn2+m2n2mn+m+n)=(mn1)(nm)(mn2+m2n2mn+m+n) m^2(n^2 - n + 1)^2 - n^2(m^2 - m + 1)^2 = (mn^2 - m^2n + m - n)(mn^2 + m^2n - 2mn + m + n) \\ = (mn - 1)(n - m)(mn^2 + m^2n - 2mn + m + n)
is divisible by mn1mn - 1, meaning that (mn1)n2(m2m+1)2(mn - 1) \mid n^2(m^2 - m + 1)^2. But mn1mn - 1 and n2n^2 are relatively prime, so in fact (mn1)(m2m+1)2(mn - 1) \mid (m^2 - m + 1)^2. This means that (m,n)(m, n) is a solution if and only if (n,m)(n, m) is.
Suppose now for the sake of contradiction that there existed a solution (m,n)(m, n) that was not of the stated form. Choose such a solution so that m+nm + n is minimal among such solutions and so that mnm \ge n, which we may do by the previous paragraph. Now, notice that (n2n+1)21(modn)(n^2 - n + 1)^2 \equiv 1 \pmod{n} and mn11(modn)mn - 1 \equiv -1 \pmod{n}, meaning that (n2n+1)2mn11(modn)\frac{(n^2 - n + 1)^2}{mn - 1} \equiv -1 \pmod{n}. Write (n2n+1)2mn1=kn1\frac{(n^2 - n + 1)^2}{mn - 1} = kn - 1 for some integer kk. Notice that (k,n)(k, n) is another solution and that
kn1(n2n+1)2n21<(n21)2n21=n21, kn - 1 \le \frac{(n^2 - n + 1)^2}{n^2 - 1} < \frac{(n^2 - 1)^2}{n^2 - 1} = n^2 - 1,
because mnm \ge n and n2n \ge 2. Hence, we see that k<nmk < n \le m, so we find k+n<m+nk + n < m + n. Because m+nm + n was minimal among solutions not of the claimed form, we have either that (k,n)=(2,2)(k, n) = (2, 2) or (k,n)=((t1)2+1,t2+1)(k, n) = ((t - 1)^2 + 1, t^2 + 1) for some tt. In the first case, we see that mn1=(n2n+1)2kn1=3mn - 1 = \frac{(n^2 - n + 1)^2}{kn - 1} = 3, so (m,n)=(2,2)(m, n) = (2, 2). In the second case, we find that mn1=(n2n+1)2kn1=((t+1)2+1)n1mn - 1 = \frac{(n^2 - n + 1)^2}{kn - 1} = ((t + 1)^2 + 1)n - 1, so (m,n)=((t+1)2+1,t2+1)(m, n) = ((t + 1)^2 + 1, t^2 + 1). Therefore, (m,n)(m, n) is a solution of the claimed form, a contradiction. Hence, we have found all possible solutions.

Solution 2

Solution 2 (By Zuming Feng with assistance from Sherry Gong and Palmer Mebane). We apply Fermat's infinite descent method. Suppose that (m,n)(m, n) is a pair of positive integers satisfying the given conditions. By the given condition, we have
0(n2n+1)2m2(n2n+1)2(mn2mn+1)2(n+m1)2(modmn1); 0 \equiv (n^2 - n + 1)^2 \equiv m^2(n^2 - n + 1)^2 \equiv (mn^2 - mn + 1)^2 \equiv (n + m - 1)^2 \pmod{mn - 1};
that is, mn1mn - 1 divides (m+n1)2(m + n - 1)^2. Assume that
(m+n1)2mn1=qor(m+n1)2q(mn1)=0.(1) \frac{(m + n - 1)^2}{mn - 1} = q \quad \text{or} \quad (m + n - 1)^2 - q(mn - 1) = 0. \qquad (1)
Notice that the above relation is symmetric with respect to mm and nn.
Now, suppose that (m,n)(m, n) is a solution of the equation such that mn0m \ge n \ge 0 and so that m+nm + n is minimal among all solutions (m,n)(m', n') of (1) for a fixed qq. Consider the quadratic equation
f(x)=(x+n1)2q(xn1)=x2+(2n2qn)x+(n1)2+q.(2) f(x) = (x + n - 1)^2 - q(xn - 1) = x^2 + (2n - 2 - qn)x + (n - 1)^2 + q. \qquad (2)
One of the roots of f(x)f(x) is x1=mx_1 = m; let the other be x2x_2. Then x1+x2=qn+22nx_1 + x_2 = qn + 2 - 2n (implying that x2x_2 is an integer) and x1x2=(n1)2+qx_1x_2 = (n-1)^2 + q (implying that x2x_2 is positive). Thus, (x2,n)(x_2, n) is another pair of positive integers satisfying (1). By our minimality assumption on (m,n)(m, n), we must have x2mx_2 \ge m. Thus, either n=mn = m or point (n,0)(n, 0) lies to the left of the two roots of f(x)f(x), from which it follows that
0f(n)=(2n1)2q(n21)=(4q)n24n+q+1; 0 \le f(n) = (2n - 1)^2 - q(n^2 - 1) = (4 - q)n^2 - 4n + q + 1;
that is, we have
0(q4)n2+4n(q+1)=(q4)n2+5n(q+1)n=[(q4)n+(q1)](n1)n.(3) 0 \ge (q-4)n^2 + 4n - (q+1) = (q-4)n^2 + 5n - (q+1) - n = [(q-4)n + (q-1)](n-1) - n. \quad (3)
Now we consider all the possible values of nn and qq. If n=1n = 1, (1) becomes m2=q(m1)m^2 = q(m - 1), which is impossible for integer m>2m > 2 because gcd(m,m1)=1\text{gcd}(m, m-1) = 1 for m3m \ge 3. Thus the only possible solution in this case is (m,n)=(2,1)(m, n) = (2, 1) and q=4q = 4. For n=2n = 2, we can write (1) as
4q=4(m+1)22m1=2m+5+92m1, 4q = \frac{4(m+1)^2}{2m-1} = 2m + 5 + \frac{9}{2m-1},
giving only the solution (m,n)=(2,2)(m, n) = (2, 2) with q=3q = 3. For n3n \ge 3, (3) becomes
0[(q4)n+(q1)](n1)n2(q4)nn=(2q9)n, 0 \ge [(q-4)n + (q-1)](n-1) - n \ge 2(q-4)n - n = (2q-9)n,
which is true only if q4q \le 4. Also, by the AM-GM inequality, (1) leads to q(mn1)=(m+n1)24n(m1)=4mn4nq(mn - 1) = (m + n - 1)^2 \ge 4n(m - 1) = 4mn - 4n. If q3q \le 3, then 3mn34mn4n3mn - 3 \le 4mn - 4n or mn4n+3mn \le 4n + 3. Therefore, we can conclude that either q=4q = 4 or q=3q = 3 and 3m43 \le m \le 4; it is easy to check that neither case leads to any solutions. Thus, the only minimal solutions are (m,n)=(2,2)(m, n) = (2, 2) with q=3q = 3 and (m,n)=(2,1)(m, n) = (2, 1) with q=4q = 4.
Suppose now for the sake of contradiction that for some qq there existed a solution (m,n)(m, n) that was not of the claimed form. Choose such a solution with m+nm+n minimal and so that mnm \ge n. Then, write m2=qn+22nmm_2 = qn + 2 - 2n - m for the root of f(x)=(x+n1)2q(xn1)f(x) = (x+n-1)^2 - q(xn-1) other than mm. If m2<mm_2 < m, then m2+n<m+nm_2 + n < m + n, meaning that either (m2,n)=(2,2)(m_2, n) = (2, 2) or (m2,n)=(t2±2t+2,t2+1)(m_2, n) = (t^2 \pm 2t + 2, t^2 + 1); in the first case, we see that (m,n)=(2,2)(m, n) = (2, 2) and in the second we see that (m,n)=(t22t+2,t2+1)(m, n) = (t^2 \mp 2t + 2, t^2 + 1), which are both in the claimed form, a contradiction. Otherwise, we have qn+22nm=m2mqn + 2 - 2n - m = m_2 \ge m, so we find that q22n+1mn\frac{q-2}{2}n + 1 \ge m \ge n. For q=3q = 3, this implies that n2n \le 2, so we may check that (m,n)=(2,2)(m, n) = (2, 2), a contradiction. For q=4q = 4, we see that n+1mnn + 1 \ge m \ge n; if m=nm = n, (1) reduces to 54n=05 - 4n = 0, which is impossible, and if m=n+1m = n + 1, (1) gives 44n=04 - 4n = 0, so (m,n)=(2,1)(m, n) = (2, 1), a contradiction. Therefore, all solutions are of the claimed form.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.