Diophantine Equations 12.03.16

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

Linear Diophantine Equations (LDEs)

Definition 1
An equation of the form

a1 x1 + a2 x2 + · · · + an xn = b (1)

with a1 , a2 , . . . , an , b integers, is called a linear Diophantine


equation (LDE).

Theorem 2
The LDE
a1 x1 + a2 x2 + · · · + an xn = b
has a solution x1 , ..., xn ∈ Z if and only if gcd(a1 , a2 , . . . , an )|b
Quadratic Diophantine Equations (QDEs)

Definition 3
An equation of the form
n
X
aij xi xj = b (2)
i,j=1

with aij , b integers, is called a quadratic Diophantine equation


(QDE).

Example 4 (Pythagorean Equations)


The equation
x2 + y2 = z2
is a QDE. Any solution (x, y , z) of this equation for integers x, y , z
is called a Pythagorean triple.
Pythagorean Equations

Consider the Pythagorean equation:

x 2 + y 2 = z 2. (3)

I A solution (x0 , y0 , z0 ) of Eq. (3) where x0 , y0 , z0 are pairwise


relatively prime is called a primitive solution.
I If (x0 , y0 , z0 ) is a solution of Eq. (3) then so are

(±x0 , ±y0 , ±z0 ) and (kx0 , ky0 , kz0 ).

I Therefore we are most interested in solutions (x, y , z) of Eq.


(3) with all components positive.
Pythagorean Equations

Theorem 5
Any primitive solution of

x2 + y2 = z2

is of the form

x = m2 − n2 , y = 2mn, z = m2 + n2 (4)

Where m, n ≥ 1 are relatively prime positive integers.


Pell’s Equation

Definition 6
Pell’s equation has the form

x 2 − dy 2 = 1 (5)

where d not a perfect square.

Definition 7
We say that (x0 , y0 ) is a fundamental solution of Pell’s equation if
x0 , y0 are positive integers that are minimal amongst all solutions.
The Graph of Pell’s Equation

The equation has the fundamental solution (x0 , y0 ) = (3,2).


Pell’s Equation

Theorem 8
Pell’s equation has infinitely many solutions. Given the solution
(x0 , y0 ) the solution (xn+1 , yn+1 ) is given by

xn+1 = x0 xn + dy0 yn , x1 = x0 , n ≥ 1

(6)

yn+1 = y0 xn + x0 yn , y1 = y0 , n ≥ 1

Example 9
The equation x 2 − 2y 2 = 1, has the fund. sol. (x0 , y0 ) = (3,2). So

x2 = x02 + dy02 = 9 + 2.4 = 17, y2 = y0 x0 + x0 y0 = 6 + 6 = 12

is also a solution: 172 − 2.122 = 1.


General Solution of Pell’s Equation
Theorem 10
Let Pell’s equation x 2 − dy 2 = 1, have the fundamental solution
(x0 , y0 ). Then (xn , yn ) is also a solution, given by
 1 √ n √ n
x n = [(x0 + y0 d) + (x0 − y0 d) ]
2



(7)
 1 √ √
yn = √ [(x0 + y0 d)n − (x0 − y0 d)n ]


2 d

Example 11
Solve x 2 − 2y 2 = 1. The fund. sol. is (3,2). The general solution
is:
1 √ √ 1 √ √
xn = [(3+2 2)n +(3−2 2)n ], yn = √ [(3+2 2)n −(3−2 2)n ]
2 2 2
The General Form of Pell’s Equation

Definition 12
The general Pell’s equation has the form

ax 2 − by 2 = 1 (8)

where ab not a perfect square.


The equation

u 2 − abv 2 = 1 (9)

is called the Pell’s resolvent of Eq. (8)


The General Form of Pell’s Equation

Theorem 13
Let
ax 2 − by 2 = 1
have an integral solution. Let (A, B) solution for least positive
A, B. The general solution is

xn = Aun + bBvn
(10)
yn = Bun + aAvn

Where (un , vn ) is the general solution of Pell’s resolvent


u 2 − abv 2 = 1.
The General Form of Pell’s Equation
Example 14
Solve

6x 2 − 5y 2 = 1 (11)

The fund. sol. is (x, y ) = (A, B) = (1, 1). The resolvent is


u 2 − 30v 2 = 1, with fund. sol. (u0 , v0 ) = (11, 2). The general
solution of the resolvent is
 1 √ √
 un = [(11 + 2 30)n + (11 − 2 30)n ]
2



 1 √ √
vn = √ [(11 + 2 30)n − (11 − 2 30)n ]


2 30
The general solution of Eq. (11) is

xn = un + 5vn , yn = un + 6vn
Training Problem 1

Problem 1
Find all integers n ≥ 1 such that 2n + 1 and 3n + 1 are both
perfect squares.
Training Problem 1

Problem 1
Find all integers n ≥ 1 such that 2n + 1 and 3n + 1 are both
perfect squares.
Observe that

2n + 1 = x 2 , 3n + 1 = y 2 =⇒ 3x 2 − 2y 2 = 1,

with 3.2 = 6 not a square in Z.


So solving this amounts to solving the general form of Pell’s
equation.
The Negative Pell’s Equation

Definition 15
The negative Pell’s equation has the form

x 2 − dy 2 = −1 (12)

where d not a perfect square.


The Negative Pell’s Equation

Definition 15
The negative Pell’s equation has the form

x 2 − dy 2 = −1 (12)

where d not a perfect square.

Theorem 16
Let (A, B) be the smallest positive solution to Eq. (12). Then the
general solution to Eq. (12) is given by

xn = Aun + dBvn

(13)

yn = Aun + Bvn

where (un , vn ) is the general solution of u 2 − dv 2 = 1.


Training Problem 2

Problem 2
Find all pairs (k, m) such that

1 + 2 + · · · + k = (k + 1) + (k + 2) + · · · + m.
Training Problem 2

Problem 2
Find all pairs (k, m) such that

1 + 2 + · · · + k = (k + 1) + (k + 2) + · · · + m.

Adding 1 + 2 + · · · + k to both sides of the above equality we get

2k(k + 1) = m(m + 1) ⇐⇒ (2m + 1)2 − 2(2k + 1)2 = −1.


Training Problem 2

Problem 2
Find all pairs (k, m) such that

1 + 2 + · · · + k = (k + 1) + (k + 2) + · · · + m.

Adding 1 + 2 + · · · + k to both sides of the above equality we get

2k(k + 1) = m(m + 1) ⇐⇒ (2m + 1)2 − 2(2k + 1)2 = −1.

The associated negative Pell’s equation is x 2 − 2y 2 = −1 with the


minimal solution (A, B) = (1, 1).
Training Problem 3
Problem 3 (Romanian M. Olympiad, 1999)
Show that the equation x 2 + y 3 + z 3 = t 4 has infinitely many
solutions x, y , z, t, ∈ Z with the greatest common divisor 1.
Training Problem 3
Problem 3 (Romanian M. Olympiad, 1999)
Show that the equation x 2 + y 3 + z 3 = t 4 has infinitely many
solutions x, y , z, t, ∈ Z with the greatest common divisor 1.
Start from the equality
n(n + 1) 2
 
3 3 3 3 3
[1 + 2 + · · · + (n − 2) ] + (n − 1) + n =
2
2
n(n + 1) 2
  
(n − 2)(n − 1) 3 3
+ (n − 1) + n = .
2 2
Training Problem 3
Problem 3 (Romanian M. Olympiad, 1999)
Show that the equation x 2 + y 3 + z 3 = t 4 has infinitely many
solutions x, y , z, t, ∈ Z with the greatest common divisor 1.
Start from the equality
n(n + 1) 2
 
3 3 3 3 3
[1 + 2 + · · · + (n − 2) ] + (n − 1) + n =
2
2
n(n + 1) 2
  
(n − 2)(n − 1) 3 3
+ (n − 1) + n = .
2 2
n(n+1)
Do there exist infinitely many integers n ≥ 1 such that 2 is a
perfect square?
Training Problem 3
Problem 3 (Romanian M. Olympiad, 1999)
Show that the equation x 2 + y 3 + z 3 = t 4 has infinitely many
solutions x, y , z, t, ∈ Z with the greatest common divisor 1.
Start from the equality
n(n + 1) 2
 
3 3 3 3 3
[1 + 2 + · · · + (n − 2) ] + (n − 1) + n =
2
2
n(n + 1) 2
  
(n − 2)(n − 1) 3 3
+ (n − 1) + n = .
2 2
n(n+1)
Do there exist infinitely many integers n ≥ 1 such that 2 is a
perfect square?

n(n + 1) = n2 + n = 2m2 ⇐⇒ 4n2 + 4n = 8m2


⇐⇒ (2n + 1)2 − 2(2m)2 = 1
This is Pell’s equation, which has infinitely many solutions.
Training Problem 4

Problem 4 (Irish M. Olympiad, 1995)


Determine all integers a such that the equation x 2 + axy + y 2 = 1
has infinitely many solutions.
Training Problem 4

Problem 4 (Irish M. Olympiad, 1995)


Determine all integers a such that the equation x 2 + axy + y 2 = 1
has infinitely many solutions.
Rewrite the given equation in the form

(2x + ay )2 − (a2 − 4)y 2 = 4 (14)


Training Problem 4

Problem 4 (Irish M. Olympiad, 1995)


Determine all integers a such that the equation x 2 + axy + y 2 = 1
has infinitely many solutions.
Rewrite the given equation in the form

(2x + ay )2 − (a2 − 4)y 2 = 4 (14)

1. If a2 − 4 < 0 then we have a finite number of solutions.


Training Problem 4

Problem 4 (Irish M. Olympiad, 1995)


Determine all integers a such that the equation x 2 + axy + y 2 = 1
has infinitely many solutions.
Rewrite the given equation in the form

(2x + ay )2 − (a2 − 4)y 2 = 4 (14)

1. If a2 − 4 < 0 then we have a finite number of solutions.


2. If a2 − 4 = 0 the equation becomes 2x + ay = ±2 with
infinitely many solutions.
Training Problem 4

Problem 4 (Irish M. Olympiad, 1995)


Determine all integers a such that the equation x 2 + axy + y 2 = 1
has infinitely many solutions.
Rewrite the given equation in the form

(2x + ay )2 − (a2 − 4)y 2 = 4 (14)

1. If a2 − 4 < 0 then we have a finite number of solutions.


2. If a2 − 4 = 0 the equation becomes 2x + ay = ±2 with
infinitely many solutions.
3. If a2 − 4 > 0, then a2 − 4 cannot be a perfect square and so
the Pell’s equation u 2 − (a2 − 4)v 2 = 1 has infinitely many
solutions. Letting x = u − av , y = 2v , we also have infinitely
many solutions for a2 − 4 ≥ 0
Training Problem 5

Problem 5 (Bulgarian M. Olympiad, 1999)


Solve x 3 = y 3 + 2y 2 + 1 for integers x, y .
Training Problem 5

Problem 5 (Bulgarian M. Olympiad, 1999)


Solve x 3 = y 3 + 2y 2 + 1 for integers x, y .
If y 2 + 3y > 0 then

y 3 < x 3 = y 3 + 2y 2 + 1 < (y 3 + 2y 2 + 1) + (y 2 + 3y ) = (y + 1)3 ,

which is impossible.
Training Problem 5

Problem 5 (Bulgarian M. Olympiad, 1999)


Solve x 3 = y 3 + 2y 2 + 1 for integers x, y .
If y 2 + 3y > 0 then

y 3 < x 3 = y 3 + 2y 2 + 1 < (y 3 + 2y 2 + 1) + (y 2 + 3y ) = (y + 1)3 ,

which is impossible.
Therefore
y 2 + 3y ≤ 0 =⇒ y = 0, −1, −2, −3.
The solution set is (1, 0), (1, −2), (−2, −3).
Training Problem 6

Problem 6
Find positive integers x, y , z such that xy + yz + zx − xyz = 2
Training Problem 6

Problem 6
Find positive integers x, y , z such that xy + yz + zx − xyz = 2
We may assume that x ≤ y ≤ z.
Training Problem 6

Problem 6
Find positive integers x, y , z such that xy + yz + zx − xyz = 2
We may assume that x ≤ y ≤ z.
1. If x = 1 then the equation is y + z = 2 =⇒ (x, y , z) = (1, 1, 1)
Training Problem 6

Problem 6
Find positive integers x, y , z such that xy + yz + zx − xyz = 2
We may assume that x ≤ y ≤ z.
1. If x = 1 then the equation is y + z = 2 =⇒ (x, y , z) = (1, 1, 1)
2. If x = 2 then the equation is
2y + 2z − yz = 2 = (z − 2)(y − 2) =⇒ z = 4, y = 3.
Training Problem 6

Problem 6
Find positive integers x, y , z such that xy + yz + zx − xyz = 2
We may assume that x ≤ y ≤ z.
1. If x = 1 then the equation is y + z = 2 =⇒ (x, y , z) = (1, 1, 1)
2. If x = 2 then the equation is
2y + 2z − yz = 2 = (z − 2)(y − 2) =⇒ z = 4, y = 3.
3. If x ≥ 3 then x, y , z, ≥ 3 which yield
xyz ≥ 3xy
xyz ≥ 3yz
xyz ≥ 3zx
Training Problem 6

Problem 6
Find positive integers x, y , z such that xy + yz + zx − xyz = 2
We may assume that x ≤ y ≤ z.
1. If x = 1 then the equation is y + z = 2 =⇒ (x, y , z) = (1, 1, 1)
2. If x = 2 then the equation is
2y + 2z − yz = 2 = (z − 2)(y − 2) =⇒ z = 4, y = 3.
3. If x ≥ 3 then x, y , z, ≥ 3 which yield
xyz ≥ 3xy
xyz ≥ 3yz
xyz ≥ 3zx
Adding the above relations it follows that

xyz ≥ xy + yz + zx =⇒ xy + yz + zx − xyz < 0 6= 2.


Training Problem 7
Problem 7
Find the positive integers x, y , z such that 3x + 4y = z 2 .
Training Problem 7
Problem 7
Find the positive integers x, y , z such that 3x + 4y = z 2 .

3x = z 2 − 4y = (z − 2y )(z + 2y ).
Then

z − 2y = 3m and z + 2y = 3n , m > n ≥ 0, m + n = x.
Training Problem 7
Problem 7
Find the positive integers x, y , z such that 3x + 4y = z 2 .

3x = z 2 − 4y = (z − 2y )(z + 2y ).
Then

z − 2y = 3m and z + 2y = 3n , m > n ≥ 0, m + n = x.

Subtracting,

2y +1 = 3n − 3m = 3m (3n−m − 1)
=⇒ 3m = 1, n = x =⇒ 3n − 1 = 2y +1
Training Problem 7
Problem 7
Find the positive integers x, y , z such that 3x + 4y = z 2 .

3x = z 2 − 4y = (z − 2y )(z + 2y ).
Then

z − 2y = 3m and z + 2y = 3n , m > n ≥ 0, m + n = x.

Subtracting,

2y +1 = 3n − 3m = 3m (3n−m − 1)
=⇒ 3m = 1, n = x =⇒ 3n − 1 = 2y +1

1. If y = 0, then n = x = 1 and z = 2.
2. If y ≥ 1 then x = n = 2, y = 2, z = 3n − 2y = 5.
Training Problem 8
Problem 8
Find the positive integers x, y , z such that 3x − 1 = y z .
Training Problem 8
Problem 8
Find the positive integers x, y , z such that 3x − 1 = y z .
If z is even we get a contradiction. So z = 2k + 1.
Training Problem 8
Problem 8
Find the positive integers x, y , z such that 3x − 1 = y z .
If z is even we get a contradiction. So z = 2k + 1. Now
3x = y z +1 = y 2k+1 +1 = (y +1)(y 2k −y 2k−1 +y 2k−2 −· · ·+y 2 −y +1).
Training Problem 8
Problem 8
Find the positive integers x, y , z such that 3x − 1 = y z .
If z is even we get a contradiction. So z = 2k + 1. Now
3x = y z +1 = y 2k+1 +1 = (y +1)(y 2k −y 2k−1 +y 2k−2 −· · ·+y 2 −y +1).
Then y ≡ −1 mod 3.
Training Problem 8
Problem 8
Find the positive integers x, y , z such that 3x − 1 = y z .
If z is even we get a contradiction. So z = 2k + 1. Now
3x = y z +1 = y 2k+1 +1 = (y +1)(y 2k −y 2k−1 +y 2k−2 −· · ·+y 2 −y +1).
Then y ≡ −1 mod 3.
y 2k −y 2k−1 +· · ·+y 2 −y +1 ≡ 1 {z· · · + 1} ≡ (2k+1) ≡ 0
|+1+ mod 3.
2k +1
Therefore z = 2k + 1 = 3p, some p:
3x = y 3p + 1 = (y p + 1)(y 2p − y p + 1) =⇒ y p + 1 = 3s .

3x = 1 + y 3p = 1 + (3s − 1)3
= 33s − 3.32s + 3.3s
= 3s+1 (32s−1 − 35 + 1)
=⇒ 32s−1 − 3s = 0 =⇒ s = 1
=⇒ y p = 3s − 1 = 2 =⇒ y = 2, p = 1, x = 2, z = 3.
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
4. ab + 1 ≡ 1 ≡ (a + 1)c ≡ ca + 1 mod a2 =⇒ a|c =⇒ c even
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
4. ab + 1 ≡ 1 ≡ (a + 1)c ≡ ca + 1 mod a2 =⇒ a|c =⇒ c even
5. (2x)b = (a + 1)2y − 1 = [(a + 1)y − 1][(a + 1)y + 1]
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
4. ab + 1 ≡ 1 ≡ (a + 1)c ≡ ca + 1 mod a2 =⇒ a|c =⇒ c even
5. (2x)b = (a + 1)2y − 1 = [(a + 1)y − 1][(a + 1)y + 1]
6. gcd((a + 1)y − 1, (a + 1)y + 1) = 2
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
4. ab + 1 ≡ 1 ≡ (a + 1)c ≡ ca + 1 mod a2 =⇒ a|c =⇒ c even
5. (2x)b = (a + 1)2y − 1 = [(a + 1)y − 1][(a + 1)y + 1]
6. gcd((a + 1)y − 1, (a + 1)y + 1) = 2
7. x|(a + 1)y − 1 = (2x + 1)y − 1 =⇒ (a + 1)y − 1 = 2x b
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
4. ab + 1 ≡ 1 ≡ (a + 1)c ≡ ca + 1 mod a2 =⇒ a|c =⇒ c even
5. (2x)b = (a + 1)2y − 1 = [(a + 1)y − 1][(a + 1)y + 1]
6. gcd((a + 1)y − 1, (a + 1)y + 1) = 2
7. x|(a + 1)y − 1 = (2x + 1)y − 1 =⇒ (a + 1)y − 1 = 2x b
8. 2b−1 = (a + 1)y + 1 > (a + 1)y − 1 = 2x b =⇒ x = 1
Training Problem 9

Problem 9 (Taiwanese M. Olympiad, 1999)


Find all positive integers a, b, c ≥ 1 such that ab + 1 = (a + 1)c

1. b = c = 1, a ≥ 1 is a solution. Let b ≥ 2.
2. ab + 1 = (a + 1)c ≡ (−1)b + 1 ≡ 0 mod a + 1 =⇒ b odd
3. (a + 1 − 1)b + 1 ≡ b(a + 1) ≡ 0 mod (a + 1)2 =⇒ a even
4. ab + 1 ≡ 1 ≡ (a + 1)c ≡ ca + 1 mod a2 =⇒ a|c =⇒ c even
5. (2x)b = (a + 1)2y − 1 = [(a + 1)y − 1][(a + 1)y + 1]
6. gcd((a + 1)y − 1, (a + 1)y + 1) = 2
7. x|(a + 1)y − 1 = (2x + 1)y − 1 =⇒ (a + 1)y − 1 = 2x b
8. 2b−1 = (a + 1)y + 1 > (a + 1)y − 1 = 2x b =⇒ x = 1
9. The only other solution is a = 2, b = c = 3.

You might also like