[Math] Prove that any set of integers that are relatively prime in pairs are relatively prime

elementary-number-theory

It seems pretty obvious, but how to prove?

I thought that maybe the way to go was by contradiction. So suppose that a set of integers is not relatively prime but pairs of members are coprime. We know for the set
$$S=\{a_1,a_2,a_3,…,a_{n-1},a_n\}$$
$(a_i,a_j)=1, \forall i,j, i\neq j$ If the set of integers was not coprime, then
$$(a_1,a_2,a_3,…,a_{n-1},a_n)=k$$
for some integer $k$. By the definition of the greatest common divisor, we know that $$k|a_i, \forall a_i\in S$$
However, for all pairs $a_i, a_j$, the only number that divides each is $1$ since $(a_i,a_j)=1$ Thus, no members of $S$ have a common divisor of $k$ which is a contradition. Therefore, the set of integers that are relatively prime in pairs is also relatively prime

Is this logical? I know there is a theorem that states $(a_1,a_2,…a_{n-1},a_n)=((a_1,a_2,…,a_{n-1}),a_n)$ which might help the cause, but that exercise has not been crossed yet in my textbook, and I think that the linear fashion of the text should be upheld… Thoughts?

Best Answer

Pretty much as you have said. To put it more concisely, . . .

Let $d$ be a positive common factor of $a_1,\ldots,a_n$. Then $d$ is a common factor of $a_1,a_2$. Since by assumption the numbers are relatively prime in pairs, $d$ can only be $1$.

Related Question