# Revision history [back]

One can rely on the Thue equation solver present in PARI. Here is a sample code for solving the equation $f(x,y)=n$:

def solvethue(f,n):
return gp("thue(thueinit(%s),%s)" % (f.subs({f.variables()[1]:1}),n))

R.<x,y> = PolynomialRing(QQ)
print( solvethue(x^3+y^3,1) )


One can rely on the Thue equation solver present in PARI. Here is a sample code for solving the equation $f(x,y)=n$:

def solvethue(f,n):
t = gp.thueinit( f.subs({f.variables()[1]:1}) )
return gp("thue(thueinit(%s),%s)" % (f.subs({f.variables()[1]:1}),n))
gp.thue(t,n)

R.<x,y> = PolynomialRing(QQ)
print( solvethue(x^3+y^3,1) )


One can rely on the Thue equation solver present in PARI. Here is a sample code for solving the equation $f(x,y)=n$:

def solvethue(f,n):
assert f.is_homogeneous()
t = gp.thueinit( f.subs({f.variables()[1]:1}) )
return gp.thue(t,n)

R.<x,y> = PolynomialRing(QQ)
print( solvethue(x^3+y^3,1) )