# prime numbers and divisibility question - number theory

I have a fairly short and straightforward question I would like to ask. Suppose $p_{1},p_{2},...,p_{n}$ are prime numbers. Suppose $X = p_{1}p_{2}...p_{n} + 1$. If $X$ comes out to be a composite number, then why is it true then that none of the $p_{1},p_{2},...,p_{n}$ divide $X$?

• $\,p\mid pk\!+\!1\,\Rightarrow\, p n = pk\!+\!1\,\Rightarrow\, p(n\!-\!k) = 1\,\Rightarrow\, p = \pm 1,\$ for any integers $\,p,k.\$ More generally $\,p\mid pk\!+\!j\iff p\mid j\ \ \$ – Bill Dubuque Mar 26 '15 at 19:07

Formally assume that $p_i$ divides $X=bp_i+1$ so there exists an integer $a$ such that $X=a.p_i$and then $p_i(a-b)=1$ so $p_i$ divides $1$ which is impossible.
Because they all leave a remainder of 1 when they (try to) divide $X$.
If one of these divide $X$ (call it $p_{i}$) then we have that the following:
$\frac{p_{1}p_{2}...p_{n}}{p_{i}} + \frac{1}{p_{i}}$
is some integer. Note that the first term is surely an integer (we would just cancel out $p_{i}$) so the second term is also an integer - impossible: none of these numbers divide $1$.