- If $(a,b) = 1$ then $(a+b,ab) = 1$.
- If $(a,b) = 1$ then $(a+b,a-b) = 1$ or $2$.
- If $(a,b) = 1$ then $(a+b,a^2-ab+b^2) = 1$ or $3$.
Is there an algorithm to compute the gcd of two polynomials applied to coprime numbers like this?
Is there an algorithm to compute the gcd of two polynomials applied to coprime numbers like this?
For homogeneous polynomials, as in your examples, you can basically apply the Euclidean algorithm.
In the general case, you can still eliminate one variable from one of the polynomials, but this is rarely conclusive.
For a special case, where it is still possible to find the values of $a$ and $b$ where one of the expressions divides the other, you could look at the example of Vieta jumping.
In the case where one of the polynomials is $a+b$, as in all three of your instances above, you can do a simple substitution if $a\equiv -b \pmod d$ in the second polynomial. For example, in the case $gcd(a+b,a^2-ab+b^2)$, if $d$ is a common divisor, then we must have $0\equiv 3b^2 \pmod d$. Since $d$ must be relatively prime to $b$, this means that $3 \equiv 0 \pmod d$.