I want to use sympy to reproduce a result obtained with the Wolfram Language.
Using Wolframcloud, this expression
Solve[m^2+m*n==500 && m>n,{m,n},PositiveIntegers]
Gives the result I am looking for:
{{m->20,n->5}}
How can I reproduce this using sympy?
I have tried
import sympy as sp
m,n = sp.symbols('m n',integer=True)
sp.solve(m**2 + m*n - 500, m,n)
which gives
[(m, -m + 500/m)]
which is correct, but not particularly helpful.
Note, this question is inspired by Project Euler Problem 9.