What should a subset of prime numbers $S$ fullfill for the product of its elements plus one to equal another prime number?

70 Views Asked by At

If we let $S$ be any subset of the set of prime numbers $P$, for some S, the product of the elements of $S$ plus 1 is, in fact, another prime number:

$$\exists S \subset P:[\prod_{i=1}^{|S|} S_i] + 1 \in P$$

Here are some examples to the aforementioned claim:

$$ S = \{ 2, 3, 5 \} \Rightarrow 2 \times 3 \times 5 + 1 = 31 \in P$$ $$ S = \{ 2, 5, 7 \} \Rightarrow 2 \times 5 \times 7 + 1 = 71 \in P$$

However, there are also some cases for which the claim doesn't hold. The counterexample is as follows:

$$ S = \{ 3, 5 \} \Rightarrow 3 \times 5 + 1 = 16 \notin P$$

I was wondering what properties S should have in order to comply with this claim. One of them can be understood from the counterexample, which is that $S$ must contain 2, as:

$$2\notin S \Rightarrow \prod_{i=1}^{|S|} S_i \bmod 2 = 1 $$

What are some other things $S$ has to fulfill for the claim to be true? Can they be proven?

1

There are 1 best solutions below

0
On BEST ANSWER

You can use the classic prime $N-1$ test. Set $P = p_1p_2\dots p_k + 1$ equal to the product of the primes $+ 1$, then if you can find an integer $a$ such that $$ a^{P-1}\equiv 1 \pmod{P}$$ and $$ a^{\frac{P-1}{p_i}} \not\equiv 1 \pmod{P}\quad i=1,\dots,k $$ then $P$ is prime. If $a^{P-1} \not \equiv 1 \pmod{P}$ for any $a$ then $P$ is composite.