Why $p_1\mid a \wedge p_2\mid a \Rightarrow p_1p_2\mid a$ where $p_i$ is a prime number, $p_i \neq p_j$ and $a$ is a integer?

I don't fully understand that.

Also, is it true when $p_i$ is something different from a prime number?

  • $\begingroup$ This is not true. Take $p_1=p_2=a$. $\endgroup$ Nov 10, 2020 at 10:13
  • $\begingroup$ I edited the question to say that $p_i \neq p_j$. $\endgroup$
    – Karol
    Nov 10, 2020 at 10:39
  • $\begingroup$ For the second part of the question (non-prime $p_i$), you need still $p_1$ and $p_2$ to be coprime, as an example $p_1=2,p_2=4,a=4$ shows. $\endgroup$
    – Sil
    Nov 10, 2020 at 10:44
  • $\begingroup$ @Sil, thank you, below in the answer it's beem already said. $\endgroup$
    – Karol
    Nov 10, 2020 at 10:51

1 Answer 1


Thanks to Dietrich Burde for indicating that a counter example is the case where $p_1$ and $p_2$ are the same prime. This answer assumes that they are distinct primes.

$p_1 | a \implies ~\exists ~r ~\text{such that} ~a = p_1 \times r.$

Therefore, $p_2 | a ~\implies ~p_2 | (p_1 \times r).$

Since $p_1$ and $p_2$ are relatively prime, this implies that

$p_2 | r \implies ~\exists ~$s$ ~\text{such that} ~r = ~p_2 \times s.$

Therefore, $p_2 \times s \times p_1 = r \times p_1 = a.$

A sufficient (but not necessarily required) condition is that $p_1$ and $p_2$ be relatively prime. They don't have to actually be prime #'s.

  • $\begingroup$ But $p_2sp_1=rp_1$ is wrong for $r=s=1$ (the OP doesn't say that $p_1$ and $p_2$ are relatively prime). $\endgroup$ Nov 10, 2020 at 10:14
  • $\begingroup$ But you agree that the choice $p_1=p_2=a$ is a counterexample to the statement? So you should need that $p_1$ and $p_2$ are distinct primes. $\endgroup$ Nov 10, 2020 at 10:24
  • $\begingroup$ @DietrichBurde See my latest edit. $\endgroup$ Nov 10, 2020 at 10:31
  • $\begingroup$ Thanks, I see it now. $\endgroup$
    – Karol
    Nov 10, 2020 at 10:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.