Equations in Integers

Solve equations where the unknowns must be integers. Core techniques: factoring into integer divisor pairs, parity arguments, modular obstructions, and difference-of-squares decompositions.

Start: Difference of squares equals 91
IntermediateMathematics
Number Theory · Diophantine Equations

Start solving

Pick a puzzle below — each one has an interactive simulator you can play right away.

Start: Difference of squares equals 91

An equation in integers (or Diophantine equation) is one where we require solutions to be whole numbers — usually integers or natural numbers.

Learn the methodRead guide

Equations in Integers

An equation in integers (or Diophantine equation) is one where we require solutions to be whole numbers — usually integers or natural numbers.

The key difference from ordinary algebra: we can no longer divide freely or take square roots. Instead, the structure of the integers themselves — divisibility, parity, and modular arithmetic — becomes the main tool.


Core strategy: factor and list divisor pairs

Many integer equations can be rearranged into the form

AB=NAB = N

where AA and BB are integer expressions and NN is a known constant. Since NN has finitely many divisor pairs, we list them all and check which ones give valid solutions.

Example. Solve x2y2=91x^2 - y^2 = 91 in natural numbers.

Rewrite as (xy)(x+y)=91(x-y)(x+y) = 91. The positive divisor pairs of 9191 are (1,91)(1, 91) and (7,13)(7, 13). Setting xy=1x - y = 1, x+y=91x + y = 91 gives x=46x = 46, y=45y = 45. Setting xy=7x - y = 7, x+y=13x + y = 13 gives x=10x = 10, y=3y = 3.


Parity arguments

When both sides of an equation must match in parity (odd/even), many candidate solutions are eliminated.

Example. If xx, yy, zz are all odd, then x+yx + y and x+zx + z are even while y+zy + z is also even. Checking whether (x+y)2+(x+z)2=(y+z)2(x+y)^2 + (x+z)^2 = (y+z)^2 is possible modulo 44 often reveals a contradiction.


Modular obstructions

Reduce the equation modulo a small number (22, 33, 44, 88, 1111, ...) to show that no solution can exist, or to narrow the possibilities.

Example. Perfect squares are 0\equiv 0 or 1(mod4)1 \pmod{4}. If an equation forces a square to be 2(mod4)\equiv 2 \pmod{4}, there is no solution.


Problems in this set

The first three problems are for discussion — they introduce the factoring and parity techniques. The remaining problems are for independent work, ordered roughly by difficulty.

All puzzles