AoPS - Chapter 24 Diophantine Equations

这一节主要讲解了二元一次丢番图方程、本原勾股数、佩尔方程(Pell Equation)。

丢番图方程(Diophantine equation)是指未知数为整数的整数系数多项式等式。(丢番图方程 - 维基百科

二元一次丢番图方程:\(ax + by = c\)

关于 \(x,y\) 的形如 \(ax+by=c\) 的丢番图方程称为二元一次丢番图方程。

求解

方程有解的充要条件为 \(\gcd(a,b) | c\)

首先凑出该方程的一组特解 \((x_0, y_0)\)

则原方程的解为:

\[\begin{cases} x = x_0 + \dfrac b {\gcd(a, b)} k \\ y = y_0 - \dfrac a {\gcd(a, b)} k \\ \end{cases}, k \in \mathbb Z\]

补充:第一步凑特解可以使用扩展欧几里得算法(Extended Euclidean algorithm)进行无需人类智慧的求解。

勾股数:\(x^2 + y^2 = z^2\)

Example 求解丢番图方程 \(x^2 + y^2 = z^2\)。即求解勾股数(Pythagorean triples)的表达式。

Solution

\(x,y,z\) 若不互质,则必定有 \(\gcd(x,y,z) = d \ne 1\),将 \(x,y,z\) 都除去 \(d\) 可得互质的解。\(x,y,z\) 两两互质的勾股数称为本原(primitive)勾股数。接下来仅求解本原勾股数。

分析奇偶性,可得 \(x,y\) 为一奇一偶,\(z\) 为奇数。不妨设 \(x\) 为偶数,\(y\) 为奇数。

不难得到:

\[\dfrac {x^2} 4 = \dfrac {z-y} 2 \times \dfrac {z+y} 2 \]

\(\dfrac {z-y} 2\)\(\dfrac {z+y} 2\) 是互质的,所以均为完全平方数。

\(\dfrac {z-y} 2 = s^2\)\(\dfrac {z+y} 2 = r^2\),得到本原勾股数表达式:

\[\boxed{\begin{cases} x = 2rs \\ y = r^2 - s^2 \\ z = r^2 + s^2 \\ \end{cases}}\]

其中 \(r \perp s\)\(r > s\)

其它勾股数只要将本原勾股数的三个数都乘上一个倍数 \(d\) 即可。

本原勾股数的性质

  • \(x,y\) 有且仅有一个是 \(3\) 的倍数。
  • \(x,y\) 有且仅有一个是 \(4\) 的倍数。
  • \(x,y,z\) 有且仅有一个是 \(5\) 的倍数。

Example: \(x^4 + y^4 = z^2\)

无穷递降法(Infinite descent)证明无解。

TODO:

Pell 方程:\(x^2 - D y^2 = \pm 1\)

篇幅太长,单独分一页:AoPS - Chapter 24.5 The Pell Equation

课后习题

No. 413

Problem

Solve the equation

\[\sum\limits_{i=1}^x i! = y^2 \]

for all positive integer pairs \((x,y)\).

Solution

突破口:阶乘之和在 \(\bmod a\) 时,\(a!\) 及之后的项都会变成 \(0\)

经过尝试,在 \(\pmod 5\) 下观察,当 \(x \ge 5\) 时,\(y^2 \equiv 3 \pmod 5\),这是不可能的。因此 \(x \le 4\)

依次尝试,可得 \(\boxed{\begin{cases} x = 1 \\ y = 1 \end{cases}}\)\(\boxed{\begin{cases} x = 3 \\ y = 3 \end{cases}}\)

No. 417

Problem

Prove that if there exist natural numbers \(a,b,c,d,e\) for which \(a^4+b^4+c^4+d^4 = e^4\), then at least three of the numbers \(a,b,c\) and \(d\) are multiples of \(5\).

Solution

\(a^4 \equiv 1 \pmod 5\)。(当且仅当 \(a \not \equiv 0 \pmod 5\)

显然得证。

No. 420

Problem

Are there integers \(m\) and \(n\) such that \(5m^2 - 6mn + 7n^2 = 1985\)?

Solution

直接配平方可得 \(2m^2 + 3(m-n)^2 + 4n^2 = 1985\)\(m,n\) 有限,其实已经可以开始枚举了区区几千几万组而已

注意到 Problem 问的是有没有解,所以我们大胆猜测无解

我们配的式子有一个问题:三个平方的结果不独立。两个变量决定三个结果,这不方便说明无解。

书上答案给了一个方法,我们可以给原式 \(\times 5\) 再配:

\[(5m - 3n)^2 + 26 n^2 = 9925 \]

接下来随便找一个模数矛盾就行了。比如 \(\pmod 8\),前一项为 \(0 \text{ or } 1 \text{ or } 4\),后一项为 \(0 \text{ or } 2\),等号右边为 \(5\),矛盾。\(\square\)

No. 424

Problem

Suppose \(D\) is prime. Prove that \(x^2 - Dy^2 = -1\) has no solutions if \(-1\) is not a quadratic residue \(\pmod D\).

Solution

\(\pmod D\) 下观察,得 \(x^2 \equiv -1 \pmod D\)\(\square\)

No. 426

Problem

Prove that the Diophantine equation

\[x^3 + y^3 + z^3 + x^2y + y^2z + z^2x + xyz = 0 \]

has no solutions in nonzero integers.

Hint

Consider the parity of the left hand side in various cases.

Solution

根据 Hint,分类讨论之后可知 \(x,y,z\) 都为偶数。

\(2a = x, 2b = y, 2c = z\)。代入得:

\[8(a^3 + b^3 + c^3 + a^2b + b^2c + c^2a + abc) = 0 \]

因此 \((a,b,c)\) 也是原方程的一组解。

任何一组解减半之后又是一组新的解,根据无穷递降法,意味着解只能是 \((0,0,0)\),而这组解不符合 nonzero。\(\square\)

posted @ 2024-05-16 22:42  August_Light  阅读(161)  评论(0)    收藏  举报