Method line M14 · When and why do we use it?

Choosing a Good Modulus

In the Chinese book: 选择合适的模

Equal numbers leave equal remainders. Find a modulus where they cannot.

📖 §3.3 of 《解题方法与策略》

One idea, one pictureTry the moduli one by one. Which ones make it impossible for the left side to leave the right side’s remainder?

Loading figure…

In one sentence

If two integers are equal, they leave the same remainder when divided by any number .

Use it the other way round: if you can find an such that the left side, whatever values it takes, can never leave the right side’s remainder, then the equation has no integer solutions. Infinitely many possibilities, all checked with one small table of remainders.

There is only one hard part: which to choose. A few common “wanted posters”:

  • Squares: mod they leave only ; mod only ; mod only .
  • Cubes: mod they leave only ; mod only .
  • Fourth powers: mod they leave only ; mod only .

Predict first

How many different remainders can a perfect square leave on division by ?

Choose an answer first; then you can see the result.

Stop 1 · Congruences (Vol. 6)

You do not need to memorize remainder tables: just make one on the spot.

Example: is there a perfect square among 11, 111, 1111, …?

Step 1 / 4
Loading figure…
  1. Too big: look only at remainders

    These numbers keep growing, so you cannot take square roots one by one. Ask a different question: what do they leave on division by ?

Stop 2 · Residue systems (Vol. 6)

For squares, look mod or mod . What about cubes? Try them one at a time.

Example: does x³ + y³ = 2020 have integer solutions?

Step 1 / 5
Loading figure…
  1. Try mod 2 first

    Cubing does not change parity: can leave or . The left side can make any remainder, so there is no contradiction.

Why and of all numbers? No need to memorize it. Open the power table in the “Modular Arithmetic Lab”: try a few moduli, see which one gives the fewest remainders in the column, and choose that one.

Stop 3 · Perfect squares (Vol. 6)

The coefficient itself is often the best modulus.

The sum of the squares of three consecutive integers is

Can this be a perfect square? Setting it equal to , the question is whether has integer solutions.

Example: does m² − 3n² = 2 have integer solutions?

Step 1 / 4
Loading figure…
  1. Try mod 4 out of habit

    Mod , the old friend of squares: the left side can leave , and the right side leaves . They match, so no contradiction. Careful: this does not mean there is a solution.

Stop 4 · Diophantine equations (Vol. 6)

When both coefficients stand out, try each of them.

Example: does 15x² − 7y² = 9 have integer solutions?

Step 1 / 5
Loading figure…
  1. Mod 7: get rid of 7y²

    Divide by : vanishes and is congruent to . The right side, , leaves . And leaves exactly : no contradiction.

A good order for choosing a modulus: first try the coefficients (to make a term vanish), then the old friends of the exponent (for squares try ; for cubes ; for fourth powers ).

Practice

Exercise 1Basic

How many different remainders can a perfect square leave on division by ?

Exercise 2Advanced

The equation has no integer solutions. Of the four moduli , only one gives a contradiction. Which one?

Exercise 3Challenge

How many different remainders can a fourth power leave on division by ? Once you know, use it to show that has no integer solutions.

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

No contradiction, so it must have a solution

The wrong step: Divide both sides of by : the left side can leave and the right side leaves , so they match. Therefore the equation has integer solutions.
What went wrong? Think first, then open

Diagnosis When a modulus gives no contradiction, all it tells you is that this modulus does not help. Matching remainders are a long way from “really equal”. Switch to mod : the left side can only leave , and the right side leaves , a contradiction at once.

The right step: To prove there is no solution, one modulus that gives a contradiction is enough. To prove there is a solution, you must actually produce one.

“A modulus can prove “guilty”, never “innocent””

Exhibit

Cancelling in a congruence without thinking

The wrong step: . Cancel from both sides: .
What went wrong? Think first, then open

Diagnosis When , , which also leaves on division by , but does not leave on division by . The you cancelled shares a factor with the modulus , and cancelling like that loses solutions.

The right step: When you cancel , divide the modulus by as well: , that is, is odd.

“Only cancel a number that is coprime to the modulus; otherwise divide the modulus too”

Stops on this line

The same idea, used once in each of several places.

  1. Congruences: Definitions and Basic PropertiesVol. 6 Divisibility, Congruences and Diophantine Equations, §2.1
  2. Residue Systems and Their UsesVol. 6 Divisibility, Congruences and Diophantine Equations, §2.2
  3. Perfect SquaresVol. 6 Divisibility, Congruences and Diophantine Equations, §2.5
  4. Common Methods for Diophantine EquationsVol. 6 Divisibility, Congruences and Diophantine Equations, §3.2