Maths WorkshopMaths problems with full solutions
Exercise 2233Number theory › Diophantine equationsOlympiadAdded 4 Nov 2026

Vieta jumping: (a² + b²)/(ab + 1) is a square

#Vieta jumping#descent#Diophantine equations#extremal principle

Statement

Let a,ba,b be positive integers such that k=a2+b2ab+1k=\dfrac{a^2+b^2}{ab+1} is an integer. Prove that kk is a perfect square.

Hint

Fix kk and look at the equation a2+b2=k(ab+1)a^2+b^2=k(ab+1) as a quadratic in aa. If (a,b)(a,b) is a solution, so is the pair formed with the other root. Then take a solution with a+ba+b minimal.

Show solutionHide solution

Solution

Idea. Assume kk is not a perfect square. Among all pairs of positive integers (a,b)(a,b) with a2+b2=k(ab+1)a^2+b^2=k(ab+1) pick one with a+ba+b minimal, and with a≥ba\ge b. We build a smaller pair.

Case a=ba=b. Then 2a2=k(a2+1)2a^2=k(a^2+1), so k=2a2a2+1<2k=\frac{2a^2}{a^2+1}<2. As kk is a positive integer, k=1k=1, a perfect square. So assume a>ba>b.

The jump. Regard the equation as x2−kb x+(b2−k)=0x^2-kb\,x+(b^2-k)=0 in the unknown xx. It has the root x=ax=a; by Vieta the other root is
a′=kb−a=b2−ka,a'=kb-a=\frac{b^2-k}{a},
an integer.

  • a′>0a'>0: if a′<0a'<0 then a′≤−1a'\le-1, and from a′2+kb∣a′∣+b2−k=0a'^2+kb|a'|+b^2-k=0 (the equation with x=a′x=a') together with kb∣a′∣≥kkb|a'|\ge k we get a′2+b2≤0a'^2+b^2\le0, impossible. If a′=0a'=0 then b2=kb^2=k would be a square, excluded. So a′≥1a'\ge1.
  • a′<ba'<b: indeed a′=b2−ka<b2a≤ba'=\dfrac{b^2-k}a<\dfrac{b^2}a\le b since a≥ba\ge b.

Thus (a′,b)(a',b) is another pair of positive integers satisfying the equation, with a′+b<a+ba'+b<a+b. This contradicts the minimality of a+ba+b.

Conclusion. kk must be a perfect square.

Check. (a,b)=(8,2)(a,b)=(8,2): 64+417=4\frac{64+4}{17}=4; (27,3)(27,3): 73882=9\frac{738}{82}=9; (30,8)(30,8): 964241=4\frac{964}{241}=4 ✓.

Remark. This is IMO 1988 Problem 6, the most famous Vieta jumping problem.

Lesson. Vieta jumping: view the equation as a quadratic in one variable, use the second root to produce a smaller solution, and conclude by minimality.