| Bill Allombert on Tue, 19 Dec 2023 16:38:55 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Pell's equations and beyond |
On Mon, Dec 18, 2023 at 07:31:56PM +0100, hermann@stamm-wilbrandt.de wrote: > I stumbled over > https://math.stackexchange.com/a/3341210 > > on finding solution for Pell's equation x^2-D*y^2=1 for D=61. > > Then I implemented my pell.gq (bottom) that did the job for any D. > > Then I found this 2008 posting from Karim: > https://pari.math.u-bordeaux.fr/archives/pari-users-0811/msg00001.html > > > 1) How do these commands from Karim's posting reveal x and y? > > ? quadunit(61) The discriminant of x^2-61 is 4*61, not 61, so you should do ? u=quadunit(4*61) %3 = 29718+3805*w ? norm(u) %4 = -1 So here the unit norm is -1, so this solves x^2-61*y^2 = -1 To solve for 1, square it: ? u^2 %5 = 1766319049+226153980*w Cheers, Bill