# Prime numbers satisfying a congruence relation

Let $$p_1, p_2, \ldots, p_n$$ prime numbers such that for each $$i, 1 \le i \le n$$, $$\prod\limits_{j \neq i} p_j \equiv 1 \pmod{p_i}.$$ For example, $$2,$$ $$3$$ and $$5$$ satisfies these conditions. Then, it is true that one of $$p_1, p_2, \ldots, p_n$$ must be $$2$$?

• Ha, I see how this is related to your previous question math.stackexchange.com/q/3541810/700480 ... Your condition implies that $p_1p_2\cdots p_n(1/p_1+1/p_2+\ldots+1/p_n)\equiv 1\pmod{p_1p_2\cdots p_n}$, so $1/p_1+1/p_2+\ldots+1/p_n$ must be very close to, but above, an integer, and it is quite hard to even get to $1$ without involving a lot of primes, especially if you are not allowed to use the prime number $2$. I don't know the answer, of course, but this sounds very interesting. – Stinking Bishop Feb 14 at 23:31
• Also, do you (or anyone else) know about any other example except for $2,3,5$, containing $2$ or not? – Stinking Bishop Feb 14 at 23:35
• @StinkingBishop (2,3,7,41) and (2,3,11,13) – ACheca Feb 14 at 23:49
• Special (prime) case of this question on "Easy CRT" problems. – Bill Dubuque Feb 14 at 23:56
• It every Giuga sequence has an even factor then this implies that no Giuga number is a Carmichael number (they're all odd), so this would prove Giuga's conjecture. Were you aware of this (well-known) relationship? – Bill Dubuque Feb 15 at 1:11

Let $$m=\prod_{j=1}^i p_j$$ squarefree, if for some $$q$$ the set $$\{ p_1,\ldots, p_i,q\}$$ satisfies your condition then $$q$$ is the unique $$a\in [1,m]$$ such that $$a \frac{m}{p_j}\equiv 1\bmod p_j$$. Such a $$a$$ always exists, what is rare is that $$a$$ is prime and $$m\equiv 1\bmod a$$.
Thus we can estimate the probability that $$m$$ works as $$\approx\frac1{\log m}\times \frac{\log m}m$$ where $$\frac1{\log m}$$ is probability that $$a$$ is prime and $$\frac{\log m}m\approx \Bbb{E}[\frac1a]$$ is the probability that $$m\equiv 1\bmod a$$.
And hence the number of solutions with $$m\le M$$ is expected to be $$\approx \sum_{m\le M} \frac{|\mu(m)|}{m}\approx C \log M$$