Diophantine Equations
Integer solutions of equations, bounding, factoring integer equations
What you need to know
- A Diophantine equation asks for integer solutions, often positive ones. That gives an extra tool, divisibility: both sides must have the same factors, the same parity (odd or even), and the same remainders. Example: has no integer solutions, since the left side is even and is odd.
- Simon's Favorite Factoring Trick. Adding to both sides turns into . Then list the factor pairs of the right side. Example: becomes .
- Linear equations. Let , , be integers and . Then has integer solutions exactly when divides . Example: has none, because does not divide .
- All solutions from one. If is one solution, the others are for every integer : moves in steps of while moves the other way in steps of . Example: has , and also , , and so on.
- Difference of squares. means . The two factors are both even or both odd, since they differ by . Example: for , the pairs and give and .
- Bounding. If we may assume , the smallest variable can't be too big. Example: in , the fraction is the biggest of the three, so it is at least , which forces .
- Perfect squares (and other perfect powers) are rare. If , then is not a perfect square. Example: for positive , is never a square, since .
How AMC 10 tests it
- "How many ordered pairs of positive integers satisfy …?" with an term plus terms in and . Use Simon's Favorite Factoring Trick, then count factor pairs (problems 12–20).
- Coin, stamp, or ticket problems: where and are zero or positive. Count the solutions, or find the largest or smallest value.
- "For how many is (or a similar fraction) an integer?" Rewrite it as , so must divide , and count divisors.
- Write as a sum of consecutive integers or a difference of squares; count the ways using factor pairs.
- Late problems (20–25) combine bounding and casework, such as three variables in an equation that stays the same when you swap them.
Standard approaches
- Get one variable by itself. If it lands in a fraction, the denominator must divide the numerator.
- Try to factor: Simon's Favorite Factoring Trick, difference of squares, or completing the square in both variables.
- Limit a variable using the order of the variables or the size of the terms, then try the small cases.
- Compare remainders of both sides after dividing by a small number (work mod that number). This can rule out solutions or force odd or even.
- For a linear equation, find one solution, then step by and . Count the steps that stay in range.
Worked example
How many ordered pairs of positive integers satisfy ?
(A) (B) (C) (D) (E)
Step 1: factor. multiplies out to . So add to both sides:
Step 2: both factors positive. Then can be any of the positive divisors of : . Each gives positive and . For example, and give . Check: .
Step 3: both factors negative. Since and , we have and . So if both factors are negative, is between and and is between and . Their product is at most , less than , so there are no solutions here.
Step 4: total. Only the pairs from Step 2 work.
The answer is .
Pitfalls
- Forgetting the negative factor pairs, or not checking whether they still give positive values. Example: above, gives but .
- Dropping the "same parity" rule for . If leaves remainder when divided by (), there are no solutions. Example: has none: and each pair an odd factor with an even one.
- Counting unordered pairs when the problem says ordered, or the other way round. Ordered pairs count and separately.
- Stopping after one solution of a linear equation instead of finding the whole family. Example: has three positive solutions: , , .
Traps that recur
- Only using b | 9 and a | 14 (twelve candidate pairs) without checking the full divisibility, or overlooking that 9 must divide 14b^2. (2007 AMC 10B #25)
- Listing c = 1, 10, 19, ..., 91 and then counting the gaps rather than the terms, which gives the 10 in (B). (2025 AMC 10B #23)
- Trying to guess N by testing small products, or accepting the factorization 3 times 43 that leads to N = 0. (2023 AMC 10A #23)
- Mixing pages and sheets (c sheets removed means 2c pages, and the removed pages run from 2b+1 to 2b+2c). (2021 AMC 10A #22)
- 1.2002 AMC 10A #4
For how many positive integers does there exist at least one positive integer n such that ?
- A)
- B)
- C)
- D)
- E)
- 2.2020 AMC 10B #9
How many ordered pairs of integers satisfy the equation
- A)
- B)
- C)
- D)
- E)
- 3.2008 AMC 10B #8
A class collects to buy flowers for a classmate who is in the hospital. Roses cost each, and carnations cost each. No other flowers are to be used. How many different bouquets could be purchased for exactly ?
- A)
- B)
- C)
- D)
- E)
- 4.2024 AMC 10A #11
How many ordered pairs of integers satisfy ?
- A)
- B)
- C)
- D)
- E)
- 5.2024 AMC 10A #15
Let be the greatest integer such that both and are perfect squares. What is the units digit of ?
- A)
- B)
- C)
- D)
- E)
- 6.2023 AMC 10B #14
How many ordered pairs of integers satisfy the equation ?
- A)
- B)
- C)
- D)
- E)
- 7.2023 AMC 10B #11
Suzanne went to the bank and withdrew . The teller gave her this amount using bills, bills, and bills, with at least one of each denomination. How many different collections of bills could Suzanne have received?
- A)
- B)
- C)
- D)
- E)
- 8.2021 AMC 10B #11
Grandma has just finished baking a large rectangular pan of brownies. She is planning to make rectangular pieces of equal size and shape, with straight cuts parallel to the sides of the pan. Each cut must be made entirely across the pan. Grandma wants to make the same number of interior pieces as pieces along the perimeter of the pan. What is the greatest possible number of brownies she can produce?
- A)
- B)
- C)
- D)
- E)
- 9.2016 AMC 10A #14
How many ways are there to write as the sum of twos and threes, ignoring order? (For example, and are two such ways.)
- A)
- B)
- C)
- D)
- E)
- 10.2015 AMC 10A #15
Consider the set of all fractions where and are relatively prime positive integers. How many of these fractions have the property that if both numerator and denominator are increased by , the value of the fraction is increased by ?
- A)
- B)
- C)
- D)
- E)
- 11.2015 AMC 10B #15
The town of Hamlet has people for each horse, sheep for each cow, and ducks for each person. Which of the following could not possibly be the total number of people, horses, sheep, cows, and ducks in Hamlet?
- A)
- B)
- C)
- D)
- E)
- 12.2014 AMC 10A #21
Positive integers and are such that the graphs of and intersect the -axis at the same point. What is the sum of all possible -coordinates of these points of intersection?
- A)
- B)
- C)
- D)
- E)
- 13.2008 AMC 10B #15
How many right triangles have integer leg lengths and and a hypotenuse of length , where ?
- A)
- B)
- C)
- D)
- E)
- 14.2002 AMC 10B #16
For how many integers is the square of an integer?
- A)
- B)
- C)
- D)
- E)
- 15.2001 AMC 10 #14
A charity sells benefit tickets for a total of . Some tickets sell for full price (a whole dollar amount), and the rest sells for half price. How much money is raised by the full-price tickets?
- A)$782
- B)$986
- C)$1158
- D)$1219
- E)$1449
- 16.2025 AMC 10B #23
A rectangular grid of squares has rows and columns. Each square has room for two numbers. Horace and Vera each fill in the grid by putting the numbers from through into the squares. Horace fills the grid horizontally: he puts through in order from left to right into row , puts through into row in order from left to right, and continues similarly through row . Vera fills the grid vertically: she puts through in order from top to bottom into column , then through into column in order from top to bottom, and continues similarly through column . How many squares get two copies of the same number?
- A)
- B)
- C)
- D)
- E)
- 17.2023 AMC 10A #23
If the positive integer has positive integer divisors and with , then and are said to be divisors of . Suppose that is a positive integer that has one complementary pair of divisors that differ by and another pair of complementary divisors that differ by . What is the sum of the digits of ?
- A)
- B)
- C)
- D)
- E)
- 18.2021 AMC 10A #22
Hiram's algebra notes are pages long and are printed on sheets of paper; the first sheet contains pages and , the second sheet contains pages and , and so on. One day he leaves his notes on the table before leaving for lunch, and his roommate decides to borrow some pages from the middle of the notes. When Hiram comes back, he discovers that his roommate has taken a consecutive set of sheets from the notes and that the average (mean) of the page numbers on all remaining sheets is exactly . How many sheets were borrowed?
- A)
- B)
- C)
- D)
- E)
- 19.2015 AMC 10B #25
A rectangular box measures , where and are integers and . The volume and surface area of the box are numerically equal. How many ordered triples are possible?
- A)
- B)
- C)
- D)
- E)
- 20.2015 AMC 10A #24
For some positive integers , there is a quadrilateral with positive integer side lengths, perimeter , right angles at and , , and . How many different values of are possible?
- A)
- B)
- C)
- D)
- E)
- 21.2012 AMC 10A #22
The sum of the first positive odd integers is more than the sum of the first positive even integers. What is the sum of all possible values of ?
- A)
- B)
- C)
- D)
- E)
- 22.2008 AMC 10B #23
A rectangular floor measures by feet, where and are positive integers with . An artist paints a rectangle on the floor with the sides of the rectangle parallel to the sides of the floor. The unpainted part of the floor forms a border of width 1 foot around the painted rectangle and occupies half of the area of the entire floor. How many possibilities are there for the ordered pair ?
- A)
- B)
- C)
- D)
- E)
- 23.2007 AMC 10A #23
How many ordered pairs of positive integers, with , have the property that their squares differ by ?
- A)
- B)
- C)
- D)
- E)
- 24.2006 AMC 10B #22
Elmo makes sandwiches for a fundraiser. For each sandwich he uses globs of peanut butter at per glob and blobs of jam at per blob. The cost of the peanut butter and jam to make all the sandwiches is . Assume that , , and are positive integers with . What is the cost of the jam Elmo uses to make the sandwiches?
- A)$ 1.05
- B)$ 1.25
- C)$ 1.45
- D)$ 1.65
- E)$ 1.85
- 25.2006 AMC 10A #22
Two farmers agree that pigs are worth dollars and that goats are worth dollars. When one farmer owes the other money, he pays the debt in pigs or goats, with "change" received in the form of goats or pigs as necessary. (For example, a dollar debt could be paid with two pigs, with one goat received in change.) What is the amount of the smallest positive debt that can be resolved in this way?
- A)
- B)
- C)
- D)
- E)
- 26.2005 AMC 10B #24
Let and be two-digit integers such that is obtained by reversing the digits of . The integers and satisfy for some positive integer . What is ?
- A)
- B)
- C)
- D)
- E)
- 27.2007 AMC 10B #25
How many pairs of positive integers are there such that and have no common factors greater than and:
is an integer?
- A)
- B)
- C)
- D)
- E)
Problems © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. The topic note, tags and key insights are original to this site.