Skip to main content

AMC 12 Mock Exam 9 Problem 25

Problem 25 of 25

For positive integers aa and bb, define a sequence by x1=ax_1=a, x2=bx_2=b, and xn+2=xn+12+1xnfor n≥1.x_{n+2}=\frac{x_{n+1}^2+1}{x_n}\qquad\text{for } n\ge1. For example, a=1a=1 and b=3b=3 give 1,3,10,1013,…1,3,10,\frac{101}{3},\ldots, so that pair does not make every term an integer. How many ordered pairs (a,b)(a,b) with 1≤a≤1001\le a\le100 and 1≤b≤1001\le b\le100 make every term of the sequence an integer?

Answer choices

Show solution

Solution

All terms are positive, by induction. Subtracting xn+1xn−1=xn2+1x_{n+1}x_{n-1}=x_n^2+1 from xn+2xn=xn+12+1x_{n+2}x_n=x_{n+1}^2+1 gives xn(xn+2+xn)=xn+1(xn+1+xn−1)x_n(x_{n+2}+x_n)=x_{n+1}(x_{n+1}+x_{n-1}). So xn+2+xnxn+1=xn+1+xn−1xn\frac{x_{n+2}+x_n}{x_{n+1}}=\frac{x_{n+1}+x_{n-1}}{x_n}, and the ratio k=xn+1+xn−1xn=x3+x1x2=a2+b2+1abk=\frac{x_{n+1}+x_{n-1}}{x_n}=\frac{x_3+x_1}{x_2}=\frac{a^2+b^2+1}{ab} is the same for all nn. Thus xn+1=kxn−xn−1x_{n+1}=kx_n-x_{n-1} for every n≥2n\ge2.

Every term is an integer   ⟺  \iff kk is an integer. If kk is an integer, the linear recurrence keeps all terms integral. Conversely, suppose all terms are integers and write k=pqk=\frac pq in lowest terms. From xn+2xn−xn+12=1x_{n+2}x_n-x_{n+1}^2=1, consecutive terms are coprime. From q(xn+1+xn−1)=pxnq(x_{n+1}+x_{n-1})=px_n we get q∣xnq\mid x_n for every n≥2n\ge2. In particular qq divides the coprime numbers x2x_2 and x3x_3, so q=1q=1.

kk must be 33. So we need positive integers with a2+b2+1=kaba^2+b^2+1=kab. Among all solutions for a given kk, take one with a+ba+b minimal and a≤ba\le b. The quadratic t2−kat+(a2+1)=0t^2-kat+(a^2+1)=0 has root bb, so it has a second root b′=ka−b=a2+1bb'=ka-b=\frac{a^2+1}{b}, a positive integer, and (a,b′)(a,b') is also a solution. Minimality gives b′≥bb'\ge b, so a2+1≥b2≥a2a^2+1\ge b^2\ge a^2, which forces b=ab=a. Then 2a2+1=ka22a^2+1=ka^2 gives a2∣1a^2\mid1, so a=1a=1 and k=3k=3.

All solutions of a2+b2+1=3aba^2+b^2+1=3ab. If a<ba<b is a solution, then so is (a2+1b,a)\left(\frac{a^2+1}{b},a\right), which is smaller: a2+1b<a\frac{a^2+1}{b}<a when a≥2a\ge2, and when a=1a=1 the solution is (1,2)(1,2), which leads to (1,1)(1,1). Repeating this descent always ends at (1,1)(1,1). Reversing it, every solution with a≤ba\le b is a pair of consecutive terms of 1,1,2,5,13,34,89,233,…1,1,2,5,13,34,89,233,\ldots, where each term is 33 times the previous term minus the one before. The pairs with both entries at most 100100 are (1,1)(1,1) and both orders of (1,2)(1,2), (2,5)(2,5), (5,13)(5,13), (13,34)(13,34), (34,89)(34,89), for a total of 1+2⋅5=111+2\cdot5=\boxed{11}.

Tagged: integrality of a nonlinear recurrence · invariant and Vieta jumping (N)