Dirk Laurie on Fri, 20 May 2016 14:28:59 +0200


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

Re: What am I doing wrong?


2016-05-20 14:21 GMT+02:00 Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>:
> On Fri, May 20, 2016 at 01:59:14PM +0200, Dirk Laurie wrote:
>> % qfbsolve(Qfb(1,0,-5),4)
>> %2 = 0
>>
>> Why are the solutions x=3,y=1; x=7,y=3; x=18,y=8; etc not found?
>
> Because 4 is not prime:
>
> ? ?qfbsolve
> qfbsolve(Q,p): Return [x,y] so that Q(x,y)=p where Q is a binary
> quadratic form and p a prime
> number, or 0 if there is no solution.

Follow-up question: can Pari handle equations like x^2 - 5*y^2 = 4
directly, or must I write the code exploiting Diophantine approximation
of sqrt(5) by hand?