Re: [sage-support] Pell's equation

2014-11-02 Thread John Cremona
I was not sure whether your question was mathematical or computational. Usually "Pell equation" means the +1 equation and ones says "negative Pell equation" for the -1 version. (I once wrote a paper "On the negative Pell equation"!). As Vincent says if you have a solution x+y*sqrt(d) to the nega

Re: [sage-support] Pell's equation

2014-11-01 Thread Vincent Delecroix
Hello, First of all, I was not able to run your code. It fails on the line sage: L = [list(u^i) for i in [0..3]] Hopefully, with list(K(u^i)) instead of list(u^i) it works fine. I did not check the reference but the units of a quadratic number fields are the solution of Pell equation with eith

[sage-support] Pell's equation

2014-10-31 Thread Michael Beeson
Here I attempt to solve Pell's equation with d = 1621 following the method on page 93 of Stein's book. But the solution produced is instead a solution of the negative Pell equation x^2-y^2 = -1 (instead of 1). Actually, the example on page 93 (after correcting the typo "v" to "u") has the same