Consider the isosceles triangle with base length, b = 16, and legs, L = 17.
By using the Pythagorean theorem it can be seen that the height of the triangle, h = (172 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 1.
Find L for the twelve smallest isosceles triangles for which h = b 1 and b, L are positive integers.
解:
于是原问题转变成求等式:
的前12个正整数解。我们将等式进行变形处理,等价变形成:
对于PELL方程的最小解问题一般是采用连分数来求,我以后会专门讲一下这个方程,这里由于PELL的解比较小,所以直接很容易就求到最小解。
该方程的意思是取任意的>0的整数i ,
则的展开式合并后得到型如:,也会是原PELL方程的解!对于做题目来说只要记住这个性质就行了,如果感兴趣可以自行或者看数论书上的证明^_^
对于PELL负方程,基本用正方程类似,在我们找到最小解后,不同的地方在于其通解表达式
其中的i 只能取奇数,就是说只用奇数次的展开来构造通解。
正负方程的差别我们可以这样进行理解:
好了,现在我们回到题目来,我们发现对于方程,其最小解为代入通解表达式得到,i我们取前13个奇数,得到化简后的展开式:
我们可以惊喜的发现而这个就是我们要求的L,所以我们直接把求和就可以了,(=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里面的下标运算,目的是为了取得,{i,1,26,2}表示i从1循环到26,步长为2,-5是因为第一项取到了一个没有用的5.
运行结果为:1118049290473932
我估计通过这篇文章的讲解,各位应该是对勾股定理的整数解问题感到很有底气了,不过说回来,还是应该多加练习。
Winxos 2010-1-30
转载于:https://blog.51cto.com/winxos/330867