How can I find all the pairs of positive and coprime integers such that their difference and their sum are also coprimes?
This is $a,b$ coprime and $q,k$ coprime with $q=a+b$ and $k=a-b$ and $a>b$.
How can I find all the pairs of positive and coprime integers such that their difference and their sum are also coprimes?
This is $a,b$ coprime and $q,k$ coprime with $q=a+b$ and $k=a-b$ and $a>b$.
Suppose $\gcd(a,b)=1$. Let $g=\gcd(a+b,a-b)$.
From $g\mid(a+b)+(a-b)=2a$ and $g\mid(a+b)-(a-b)=2b$, it follows that $g\mid\gcd(2a,2b)$.
But as $\gcd(a,b)=1$, we have $\gcd(2a,2b)=2$. So $g\mid2$. That means it suffices to choose $a$ and $b$ such that $a+b$ and $a-b$ are both odd. That is, $a$ is even or $b$ is even. So $a$ and $b$ will satisfy $g=1$, if and only if $a$ and $b$ are not both odd.
Note that if a prime $p$ divides $q$ and $k$ then it also divides $k+q=2a$ and $q-k=2b$. If $\gcd (a,b)=1$ then it must be $p=2$. On the other hand, if $2\mid a+b$ then also $2\mid a-b$. So the answer is: all pairs $(a,b)$ of coprime integers s.t. $a\not\equiv b\bmod 2$.