2008年(47)
分类:
2008-11-24 19:03:19
Consider quadratic Diophantine equations of the form:
x2 – Dy2 = 1
For example, when D=13, the minimal solution in x is 6492 – 131802 = 1.
It can be assumed that there are no solutions in positive integers when D is square.
By finding minimal solutions in x for D = {2, 3, 5, 6, 7}, we obtain the following:
32 – 222 = 1
22 – 312 = 1
92 – 542 = 1
52 – 622 = 1
82 – 732 = 1
Hence, by considering minimal solutions in x for D 7, the largest x is obtained when D=5.
Find the value of D 1000 in minimal solutions of x for which the largest value of x is obtained.
x2 – Dy2 = 1这个方程叫做pell方程,对于非完全平方数D, X, Y有无数个解
求解方法 一般用的是连分数法
求出SQRT(D)的连分数[a0:(a1, a2, a3 ... an)...],其中an=2*a1
然后再计算
根据连分数循环节位数n的奇偶性分两种情况
若n为偶数,则 x= pn-1 , y= qn-1 ; n为奇数时x= p2n-1 , y= q2n-1
p0= a0, p1= a0* a1+1 , pn= an*pn-1+pn-2