![]() |
![]() |
#1 |
Aug 2019
2×3 Posts |
![]()
Hey there!
Attached is a Pell's equation solver program, in Pari-GP It uses very basic operations but seems to be quick enough. Warning though, if Y^2 - N*X^2 does not go to 1 quickly, the numbers tend to become quite prohibitively large. Nothing wrong with that perhaps, but before (and/or if) you run it in Pari, please set the precision to 200-odd digits using the command: \p 200 in the terminal window. At least this gives it a good chance of finding answers for larger values of N - though obviously even (relatively) small N values can still have large-ish smallest solutions, if you see what I mean?!! Thanks for reading. ![]() PS: The code is a bit of a mess atm, with not all variables being used etc. I'll clean it up when I get the time. Cheers. |
![]() |
![]() |
![]() |
#2 |
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36
2×7×263 Posts |
![]()
Well, I have a data, for the smallest solution of x^2-d*y^2 = 0, +-1, +-2, +-3, +-4 (if exists, the +-4 case only list primitive solutions, i.e. not a double of the x and y for the +-1 case), for d <= 25000
Last fiddled with by Uncwilly on 2022-10-27 at 00:14 Reason: Removing a vast and unneeded quote |
![]() |
![]() |
![]() |
#3 |
"Robert Gerbicz"
Oct 2005
Hungary
32×179 Posts |
![]()
That is too slow, there is a pretty nice stuff for Pell equation:
http://library.msri.org/books/Book44.../01lenstra.pdf See section 7, that is really working, I've coded that, not public. |
![]() |
![]() |
![]() |
#4 |
Aug 2019
2·3 Posts |
![]()
Thanks very much. I was looking for a resource like this to test against online. I have a Pell's Equation book, but it only has a few results in it.
|
![]() |
![]() |
![]() |
#5 |
"99(4^34019)99 palind"
Nov 2016
(P^81993)SZ base 36
2×7×263 Posts |
![]()
PARI/GP code for Pell equation: http://www.kaynet.or.jp/~kay/misc/program/pell.gp
Many other computer program codes for Pell equation: https://rosettagit.org/drafts/pells-equation/ Data for solutions of Pell equations: http://www.kaynet.or.jp/~kay/misc/pell2.html and https://raw.githubusercontent.com/xa...20equation.txt and https://raw.githubusercontent.com/xa...le%2025000.txt Online Pell equation solvers: 1. http://www.jakebakermaths.org.uk/mat...ntegerv10.html 2. http://math.fau.edu/richman/pell-m.htm 3. http://www.numbertheory.org/php/pell.html |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Diophantine equation | enzocreti | enzocreti | 6 | 2020-03-23 03:03 |
MPQS b-parameter and Pell-like equations | Till | Abstract Algebra & Algebraic Number Theory | 13 | 2017-01-20 21:12 |
Generalized Pell Equation. | jwaltos | Miscellaneous Math | 0 | 2015-08-29 02:13 |
Generalized Pell Numbers | T.Rex | Math | 0 | 2005-03-29 21:16 |
Cuberoot Equation | koal | Puzzles | 3 | 2003-07-03 11:58 |