Chapter

Diophantine Equations I: Factorisation and Bounds

This module teaches how to turn first Diophantine problems into a finite search using factorisation, divisibility, and bounds.
Log in to track solved progress and bookmarks.

Theory

Key Idea

In first Diophantine problems, the goal is not to guess solutions but to turn the equation into a finite search. This is usually done by factorisation, size bounds, or a divisibility condition that sharply restricts possible values.

A typical move is to complete a product. For instance, from \(xy+ax+by=c\) we add \(ab\) and get \((x+b)(y+a)=c+ab\). Then only the divisors of a fixed number remain.

Basic Facts

1. If \(uv=N\), where \(u,v\) are positive integers, then there are only finitely many choices: it is enough to inspect the divisors of \(N\).

2. Difference of squares: \(x^2-y^2=(x-y)(x+y)\). The factors \(x-y\) and \(x+y\) have the same parity.

3. For equations with fractions, multiply by the common denominator and complete a product: from \(\frac{1}{x}+\frac{1}{y}=\frac{1}{n}\) we obtain \((x-n)(y-n)=n^2\).

4. If \(a\mid f(n)\), where \(a\) depends on \(n\), it is often useful to reduce \(n\) modulo \(a\) or subtract a suitable multiple.

5. Bounds start the search: if \(x\le y\le z\), then \(\frac{3}{x}\ge \frac{1}{x}+\frac{1}{y}+\frac{1}{z}\).

When To Use This Method

The method is especially useful when a problem contains a product \(xy\), a difference of squares, fractions of the form \(\frac{1}{x}\), a divisibility condition, or a request to find all integer solutions. It also works well with positive variables: then an ordering such as \(x\le y\le z\) gives upper bounds.

How To Recognise The Method

Look for expressions that are almost products: \(xy+ax+by\), \(x^2-y^2\), \(xy-nx-ny\), \(x^2+2x-y^2\). If moving terms gives an “almost factorisation”, try adding and subtracting one constant.

If no direct factorisation is visible, make one variable the main one: express \(y\), obtain a divisibility condition, or treat the equation as a quadratic with an integer discriminant.

Typical Mistakes

Do not forget positivity and parity restrictions. In a difference of squares, the factors cannot be chosen independently: \(x-y\) and \(x+y\) must have the same parity.

In fraction problems, do not divide by a variable without noting that it is nonzero. In “find all” problems, every candidate obtained from a divisor search must be checked in the original condition.

Mini-Checklist

1. Have all terms been moved so that a product can be seen?

2. Can one add a constant and obtain \((x+a)(y+b)\)?

3. Are there parity, ordering, or positivity restrictions?

4. If divisibility appears, can the expression be reduced modulo the divisor?

5. After checking divisors, have all candidates been verified?

Examples

Example 1. Completing A Product

This example shows the basic move: turn mixed terms into a product of two brackets.

Problem. Find all positive integer solutions of \(xy+3x+2y=29\).

Solution.

Add \(6\) to both sides:

\[xy+3x+2y+6=35,\quad (x+2)(y+3)=35.\]

Since \(x,y>0\), we have \(x+2\ge 3\), \(y+3\ge 4\). The factorisations of \(35\) give \((5,7)\) and \((7,5)\). Hence \((x,y)=(3,4)\) and \((5,2)\).

Comment. The constant \(6\) appears as the product of the coefficients of \(x\) and \(y\).

Example 2. Fractions Become Divisors

Equations with \(\frac{1}{x}\) often become divisor problems after multiplying by the common denominator.

Problem. Find all positive integer pairs \((x,y)\) such that \(\frac{1}{x}+\frac{1}{y}=\frac{1}{7}\).

Solution.

Multiply by \(7xy\): \(7x+7y=xy\). Thus

\[xy-7x-7y=0,\quad (x-7)(y-7)=49.\]

So \(x=7+d\), \(y=7+\frac{49}{d}\), where \(d\mid 49\). The ordered pairs are \((8,56)\), \((14,14)\), \((56,8)\).

Example 3. Difference Of Squares

Here one must remember that \(x-y\) and \(x+y\) have the same parity.

Problem. Find all positive \(x>y\) such that \(x^2-y^2=56\).

Solution.

We write \((x-y)(x+y)=56\). The two factors have the same parity, so both must be even. The suitable factor pairs are \((2,28)\) and \((4,14)\). They give \(x=15,y=13\) and \(x=9,y=5\).

Example 4. Divisibility With A Variable Divisor

If the divisor contains \(n\), reduce \(n\) to a convenient residue modulo that divisor.

Problem. Find all positive \(n\) such that \(n+4\mid n^2+5\).

Solution.

Modulo \(n+4\), we have \(n\equiv -4\), so \(n^2+5\equiv 16+5=21\). Therefore \(n+4\mid 21\). Since \(n+4>4\), we get \(n+4=7\) or \(21\). Hence \(n=3\) and \(n=17\), and both work.

Example 5. A Hidden Product After Multiplication

Sometimes factorisation appears only after multiplying by the product of the variables.

Problem. Find all positive \(x,y\) if \(\frac{1}{x}+\frac{1}{y}+\frac{2}{xy}=\frac{1}{5}\).

Solution.

Multiply by \(5xy\): \(5x+5y+10=xy\). Hence

\[xy-5x-5y=10,\quad (x-5)(y-5)=35.\]

Checking the divisors of \(35\), we obtain \((x,y)=(6,40),(10,12),(12,10),(40,6)\).

Example 6. A Bound Before A Search

Before factorising, it is often necessary to know which values are possible at all.

Problem. Find all \(x\le y\le z\) such that \(\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=1\).

Solution.

Since \(x\le y\le z\), we have \(\frac{3}{x}\ge 1\), so \(x\le 3\). If \(x=1\), the remaining two fractions would have to sum to \(0\). If \(x=2\), then \(\frac{1}{y}+\frac{1}{z}=\frac{1}{2}\), so \((y-2)(z-2)=4\), giving \((y,z)=(3,6),(4,4)\). If \(x=3\), then \(\frac{1}{y}+\frac{1}{z}=\frac{2}{3}\), and with \(y\ge 3\) only \(y=z=3\) works. The answer is \((2,3,6),(2,4,4),(3,3,3)\).

Example 7. A Geometric Formula As A Diophantine Equation

Even a problem about Pythagorean triples can be solved by simple factorisation when the perimeter is fixed.

Problem. Find right triangles with integer sides and perimeter \(40\).

Solution.

Let the legs be \(x,y\), and let the hypotenuse be \(40-x-y\). Then

\[x^2+y^2=(40-x-y)^2.\]

After simplification, \(xy-40x-40y+800=0\), so \((x-40)(y-40)=800\). Since \(x,y<40\), put \(a=40-x\), \(b=40-y\). Then \(ab=800\), and the hypotenuse is \(a+b-40\). The suitable choice is \(a=32,b=25\) and its swap, giving the sides \(8,15,17\).

Example 8. A Construction With Intervals

In stronger problems, factorisation can be combined with the idea of covering all primes by a suitable block of consecutive integers.

Problem. For even \(m>2\), construct \(m\) consecutive integers whose product is divisible by every prime \(p\le 2m+1\).

Solution.

If \(m+1\) is composite, take \(m+2,m+3,\ldots,2m+1\). Every prime \(p\le m\) divides the product of any \(m\) consecutive integers, and every prime from \(m+2\) to \(2m+1\) appears as one of the factors. The number \(m+1\) does not need to be covered as a prime.

If \(m+1\) is prime, take \(m+3,m+4,\ldots,2m+2\). Primes \(p\le m\) are again covered by a block of length \(m\); the prime \(m+1\) divides \(2m+2\); and \(m+2\) is even and greater than \(2\), so it is not prime.

Problems

Problems

#7.1
#7.1

Completing a Product

Factorisation Grade 9 Grade 10 ★★☆☆☆

Find all positive integer pairs \((x,y)\) satisfying \(xy+2x+3y=54\).

Details
Problem: NT-B2-M07-P001
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.2
#7.2

Two Unit Fractions

Factorisation Grade 9 Grade 10 ★★☆☆☆

Find all ordered pairs of positive integers \((x,y)\) such that \(\frac{1}{x}+\frac{1}{y}=\frac{1}{10}\).

Details
Problem: NT-B2-M07-P002
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.3
#7.3

Difference of Squares

Factorisation Grade 9 Grade 10 ★★☆☆☆

Find all positive integers \(x>y\) such that \(x^2-y^2=105\).

Details
Problem: NT-B2-M07-P003
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.4
#7.4

Divisibility by Reducing the Variable

Divisibility Grade 9 Grade 10 ★★☆☆☆

Find all positive integers \(n\) such that \(n+5\mid n^2+7\).

Details
Problem: NT-B2-M07-P004
Difficulty: Level 2 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10
#7.5
#7.5

Difference of Squares of Primes

Factorisation Grade 9 Grade 10 ★★☆☆☆

Find all primes \(p>q\) such that \(p^2-q^2=120\).

Details
Problem: NT-B2-M07-P005
Difficulty: Level 2 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.6
#7.6

An Almost Prime Product

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer solutions of \(xy=4x+7y+9\).

Details
Problem: NT-B2-M07-P006
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.7
#7.7

A Fraction Equation With an Extra Term

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer pairs \((x,y)\) if \(\frac{1}{x}+\frac{1}{y}+\frac{1}{xy}=\frac{1}{8}\).

Details
Problem: NT-B2-M07-P007
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.8
#7.8

Linear Terms in a Difference of Squares

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integers \(x>y\) satisfying \(x^2-y^2=2x+2y+21\).

Details
Problem: NT-B2-M07-P008
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.9
#7.9

Shifting a Square

Factorisation Grade 9 Grade 10 ★★★☆☆

Find all positive integer pairs \((x,y)\) such that \(x^2+4x=y^2+11\).

Details
Problem: NT-B2-M07-P009
Difficulty: Level 3 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10
#7.10
#7.10

The Divisor \(2n+1\)

Divisibility Grade 9 Grade 10 ★★★☆☆

Find all positive integers \(n\) such that \(2n+1\mid n^2+n+10\).

Details
Problem: NT-B2-M07-P010
Difficulty: Level 3 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10
#7.11
#7.11

Impossibility Modulo \(4\)

Modular Arithmetic Grade 9 Grade 10 ★★★☆☆

Prove that the equation \(x^2+y^2=4xy+3\) has no integer solutions.

Details
Problem: NT-B2-M07-P011
Difficulty: Level 3 of 5
Tag: Modular Arithmetic
Grade: Grade 9, Grade 10
#7.12
#7.12

Express One Variable

Divisibility Grade 9 Grade 10 ★★★☆☆

Find all positive integer pairs \((x,y)\) such that \(x^2=xy+x+y+11\).

Details
Problem: NT-B2-M07-P012
Difficulty: Level 3 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10
#7.13
#7.13

Three Unit Fractions

Factorisation Grade 9 Grade 10 Grade 11 ★★★★☆

Find all triples of positive integers \(x\le y\le z\) such that \(\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=1\).

Details
Problem: NT-B2-M07-P013
Difficulty: Level 4 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10, Grade 11
#7.14
#7.14

A Pythagorean Triangle With Fixed Perimeter

Factorisation Grade 9 Grade 10 Grade 11 ★★★★☆

Find all right triangles with integer sides and perimeter \(60\).

Details
Problem: NT-B2-M07-P014
Difficulty: Level 4 of 5
Tag: Factorisation
Grade: Grade 9, Grade 10, Grade 11
#7.15
#7.15

Parametrisation by the Difference

Diophantine Grade 9 Grade 10 Grade 11 ★★★★☆

Find all positive integer pairs \((x,y)\) satisfying \(x^2+y^2=2xy+x+y\).

Details
Problem: NT-B2-M07-P015
Difficulty: Level 4 of 5
Tag: Diophantine
Grade: Grade 9, Grade 10, Grade 11
#7.16
#7.16

A Strong Divisibility Bound

Divisibility Grade 9 Grade 10 Grade 11 ★★★★☆

Find all positive integer pairs \((x,y)\) such that \(x^2+y^2\mid xy+1\).

Details
Problem: NT-B2-M07-P016
Difficulty: Level 4 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10, Grade 11
#7.17
#7.17

A Block of Consecutive Integers

Divisibility Grade 10 Grade 11 ★★★★★

Prove that for every integer \(N>2\), one can choose \(N\) consecutive positive integers whose product is divisible by every prime \(p\le 2N+1\).

Details
Problem: NT-B2-M07-P017
Difficulty: Level 5 of 5
Tag: Divisibility
Grade: Grade 10, Grade 11
Source: Inspired by final olympiad method · 2010 · Grade 11 · Problem 5
#7.18
#7.18

A Harder Egyptian Fraction Search

Factorisation Grade 10 Grade 11 ★★★★★

Find all triples of positive integers \(x\le y\le z\) such that \(\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=\frac{1}{2}\).

Details
Problem: NT-B2-M07-P018
Difficulty: Level 5 of 5
Tag: Factorisation
Grade: Grade 10, Grade 11
#7.19
#7.19

A Cubic Against a Quadratic

Divisibility Grade 9 Grade 10 Grade 11 ★★★★☆

Find all positive integers \(n\) such that \(n^2+3n+3\mid n^3-1\).

Details
Problem: NT-B2-M07-P019
Difficulty: Level 4 of 5
Tag: Divisibility
Grade: Grade 9, Grade 10, Grade 11
#7.20
#7.20

Another Three-Fraction Sum

Factorisation Grade 10 Grade 11 ★★★★★

Find all triples of positive integers \(x\le y\le z\) such that \(\frac{1}{x}+\frac{1}{y}+\frac{1}{z}=\frac{2}{3}\).

Details
Problem: NT-B2-M07-P020
Difficulty: Level 5 of 5
Tag: Factorisation
Grade: Grade 10, Grade 11

Ladders

No published ladders were found.
Previous Chapter
Next Chapter