# Studying when $P_n=(p_1\cdot p_2\cdots p_n)+1$ is a square number [duplicate]

This question already has an answer here:

Let $p_n$ be the $n$th prime number. I need to find under which conditions the number $$P_n=(p_1\cdot p_2\cdots p_n)+1$$ is a square number. So far I have seen that $$P_1 = 2+1 =3$$ $$P_2 = 2\cdot3+1 =7$$ $$P_3 = 2\cdot3\cdot5+1 =31$$ give all prime numbers, this is that $P_n$ is always a prime number, and so it can never be a square number. But I can not find the exact way to prove it. I though of trying something like the prove for the Euclidean Theorem that states that there are infinite prime numbers but I can not figure it out. Thank you.

## marked as duplicate by Théophile, kingW3, Umberto P., rlartiga, graydadFeb 6 '15 at 20:15

• Not sure if this is helpful to point out, but $P_n$ will have a unique prime factorization as well, say $P_n = \prod_{i=1}^k p_i^{\alpha_{i}}$ and square numbers are those in which each $\alpha_n$ is even. – graydad Feb 6 '15 at 16:35
• $(2\cdot3\cdot5\cdot7\cdot11\cdot13)+1 = 59\cdot 509$, so $p_1\cdots p_n+1$ is not always prime. And there are lots of other counterexamples to that. – Michael Hardy Feb 6 '15 at 16:36
Hint: A odd square number is of the form $4n+1$ but $(p_1\cdot p_2\cdots p_n)+1=2d+1$ where $d$ is odd.
• You should add the "$+1$" in order to make your answer correct (or at least clearer). – barak manos Feb 6 '15 at 16:45