找回密码
 欢迎注册
楼主: mathematica

[求助] 如何求解pell方程x^2-d*y^2=M

[复制链接]
发表于 6 天前 | 显示全部楼层
Solving the diophantine equation x2 – Dy2 = N, D > 0 and not a perfect square, N ≠ 0
This first finds all primitive fundamental solutions, then all fundamental solutions for the diophantine equation x2 – Dy2 = N, D > 0, D not a perfect square, N ≠ 0. We have to find all primitive fundamental solutions of the equations x2 – Dy2 = N/f2 for all divisors f of N such that f2 divides N; these belong to classes P, where P2  D (mod |N| ).
E = 1 is verbose and prints partial and complete quotients, as well as convergents, up to the end of a period (or double period, in the case of odd period).
Our algorithm (LMM) goes back to Lagrange 1770 and should be better known, as it generalises the well-known continued fraction algorithm for solving Pell's equation. (See a slide-talk (pdf) by Keith Matthews.)

Another approach to the algorithm, using ideals, was discovered by Richard Mollin - see Expositiones Math. 19 (2001) 55-73.

The standard method is due to Gauss - see G.B. Mathews Number Theory, page 97 or John Robertson, Computing in quadratic orders, page 14.

The book L'équation diophantienne du second degré, Alain Faisant, Hermann 1991, has an algorithm for getting all solutions, which also uses continued fractions.

Enter D (< 1020):
61

Enter N (≠ 0):
97

Enter E (0 or 1):
1

GO RESET
Last modified 7th March 2015

http://www.numbertheory.org/php/patz.html

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 6 天前 | 显示全部楼层
上面的链接里面有一个pdf,详细的讲了如何求解
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 6 天前 | 显示全部楼层
kastin 发表于 2019-3-19 18:18
见https://bbs.emath.ac.cn/thread-15533-1-1.html
以及http://mathworld.wolfram.com/PellEquation.html最 ...

第1个链接怎么没了?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 5 天前 | 显示全部楼层
pell方程,佩尔方程,x^2-31y^2=8837,素数
试试这个
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 5 天前 | 显示全部楼层
我看懂了华罗庚的解答,
他是通过不断降低N,形成一个多米诺骨牌,
然后N的绝对值<根号d,这时候方程可解,
再把解倒退回去,就得到原方程的解!
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 5 天前 | 显示全部楼层
华罗庚的求解办法不好,
需要多次求解剩余方程,
然后求出来的解未必是整数解。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 半小时前 | 显示全部楼层
https://bbs.emath.ac.cn/forum.ph ... =2836&pid=88108

愿力大于一切!
只要想知道如何求解,就有一天能解决!
我现在解决了这个问题
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2025-7-19 13:09 , Processed in 0.057260 second(s), 14 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表