Charles Greathouse on Wed, 23 Aug 2017 03:11:27 +0200


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

Re: Using bnfisintnorm to check if a number is of the form P


Hmm. Yes, it seems like thue is faster and better for this purpose. Thanks for the tip!

Charles Greathouse
Case Western Reserve University

On Tue, Aug 22, 2017 at 6:16 PM, Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
On Tue, Aug 22, 2017 at 05:41:41PM -0400, Charles Greathouse wrote:
> I have a homogeneous polynomial P(x,y) and a number n. I would like to find
> the integers (a, b) such that P(a, b) = n.

Why not use thue ?

? thue(z^3+2,25)
%2 = [[3,-1]]

> The basic idea is to represent P in univariate form P(x,1) and
> call bnfisintnorm(bnfinit(P), n). But I don't know how to interpret the
> output of bnfisintnorm, and the help entry doesn't really say anything.
>
> For example,
>
> bnfcertify(K = bnfinit(z^3+2,1))
> bnfisintnorm(K, 25)
>
> gives
>
> [-z^2 - 2*z + 1, z + 3]
>
> but it's not clear to me how to determine from this that 3^3 + 2*(-1)^3 ==
> 25.

You need to compute the formula for the norm form:
? norm(Mod(a+b*x+c*x^2,x^3+2))
%3 = a^3+6*c*b*a+(-2*b^3+4*c^3)

So for a=3,b=1,c=0, one get
(3)^3-2*(1)^3 = 25

Cheers,
Bill.