Bill Allombert on Wed, 23 Aug 2017 00:22:31 +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


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.