[Math] Multiplying congruences.

divisibilityelementary-number-theorymodular arithmetic

Does $p\equiv 1\pmod{p_1}, p\equiv1\pmod{p_2}$ imply that $p\equiv1\pmod{p_1p_2}$ ?

(Here $p,p_1,p_2$ are primes)

I was able to prove that $(p-1)^2\equiv0\pmod{p_1 p_2}$ but can we just root both sides?.

Also, would this work if $p_1$ and $p_2$ were not primes?

Best Answer

Yes it is true if we suppose $p_1\ne p_2$.

Since $p_1\mid p-1$ we have $p-1 =kp_1$. Since $p_2\mid p-1 = kp_1$ and $p_1,p_2$ are relatively prime we have by Gauss lemma that $p_2\mid k$ so $k= lp_2$ and thus $p-1 = lp_1p_2$ so $$p_1p_2 \mid p-1$$

And it does not work if $p_1,p_2$ are not both primes. Say $p=29,p_1=14$ and $p_2=7$

Related Question