Bill Allombert on Wed, 09 Nov 2011 23:55:09 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: pour s'abonner


On Wed, Nov 09, 2011 at 11:54:43PM +0530, angshuman karmakar wrote:
> I am asking about is there any way to solve Generalized Pell's Equation i.e
> equations of the form x^2-Dy^2=N where D is a square free positive integer,
> In PARI.

As I said. You can do it using bnfisintnorm.
Here an example:

To solve x^2-17*y^2=59

? bnfisintnorm(bnfinit(x^2-17),59)
%3 = [5*x + 22, -11*x - 46]

So the solutions (modulo units of positive norms) are 
x=22,y=5 and x=46,y=11

indeed
22^2-17*5^2 = 59 
and
46^2-17*11^2 = 59

Cheers,
Bill.