Problem 138

Consider the isosceles triangle with base length, b = 16, and legs, L = 17.

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲

By using the Pythagorean theorem it can be seen that the height of the triangle, h = Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_02(172 Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_03 82) = 15, which is one less than the base length.

With b = 272 and L = 305, we get h = 273, which is one more than the base length, and this is the second smallest isosceles triangle with the property that h = b Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_04 1.

Find Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_勾股数_05 L for the twelve smallest isosceles triangles for which h = b Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_06 1 and b, L are positive integers.

解:

假设Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Euler Project_07Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_勾股数_08,又设Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Euler Project_09

于是原问题转变成求等式:

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_10

的前12个正整数解。我们将等式进行变形处理,等价变形成:

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_11

注:由于Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_勾股数_12都是正整数,所以判别式外面不需要Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Euler Project_13

我们设Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_14

为了使Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_15为整数,则Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_16必须为正整数而且Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_勾股数_17

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_18

这里我们很容易找到方程的最小解为Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_勾股数_19

对于PELL方程的最小解问题一般是采用连分数来求,我以后会专门讲一下这个方程,这里由于PELL的解比较小,所以直接很容易就求到最小解。

我们知道PELL方程Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_20的最小解Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_21后,则其通解Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_22可以表示为:

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_23

该方程的意思是取任意的>0的整数i ,

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_24的展开式合并后得到型如:Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_25Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_26也会是原PELL方程的解!对于做题目来说只要记住这个性质就行了,如果感兴趣可以自行或者看数论书上的证明^_^

对于PELL负方程Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_27,基本用正方程类似,在我们找到最小解后,不同的地方在于其通解表达式

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_28

其中的i 只能取奇数,就是说只用奇数次的展开来构造通解。

正负方程的差别我们可以这样进行理解:

对于正方程Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_29,对于任意的i都成立;

对于负方程Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_30,f只有进行奇数次的展开才会等于Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_31;

好了,现在我们回到题目来,我们发现对于方程Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_32,其最小解为Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_职场_33代入通解表达式Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_34得到Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_35,i我们取前13个奇数,得到化简后的展开式:

Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_36

我们可以惊喜的发现Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_休闲_37而这个Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_38就是我们要求的L,所以我们直接把Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_勾股数_39求和就可以了,(Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Pell Equation_40=1不满足三角形要求舍去).

完整的Mathematica代码为:

Total[Table[Expand[(2+Sqrt[5])^i][[2,1]],{i,1,26,2}]]-5

对不懂Mathematica的朋友我稍微解释一下代码,Expand表示用其自带的表达式展开的函数展开2+Sqrt[5])^i,[[2,1]]是Mathematica里面的下标运算,目的是为了取得Euler Project Promblem 138 /Pell Equation/特殊勾股数整数通解_Euler Project_41,{i,1,26,2}表示i从1循环到26,步长为2,-5是因为第一项取到了一个没有用的5.

运行结果为:1118049290473932

我估计通过这篇文章的讲解,各位应该是对勾股定理的整数解问题感到很有底气了,不过说回来,还是应该多加练习。

Winxos 2010-1-30