I know that the answer is no, yet I dont know how to prove it wrong. Finding a counterexample is not a good solution because it is a past written exam question with no calculators allowed. The first counterexample is about 30000... Is there a, simple preferred, solution to this problem? (This is asked in a CS discrete math exam)

The original problem is from Rosen Discrete Math, and as follows:

Prove or disprove that $p_1p_2 ... p_n+1$ is prime for every integer n, where $p_i$ is the ith smallest prime number.

Though the prime factors for n=6 are not entirely obvious without a calculator...
–
Jason DeVitoJan 11 '10 at 4:01

4

This is funny; the comments are answers and the answers are comments. (Partly understandable because Wlog can't comment and the commenters probably feel it's too straightforward to answer.) If the past class had seen a solution, they would be able to reproduce it; some teachers give exam question like that, so just because they didn't have a calculator doesn't mean it wasn't doable. I don't agree with Qiaochu 100%; what you seem to be asking for is a qualitative, non-computational way to show that such a counterexample must exist without necessarily producing one. Can someone do it?
–
Jonas MeyerJan 11 '10 at 4:41

18

I am reminded of Hendrik Lenstra's proof that there are infinitely many composite numbers: Suppose that there are only finitely many composite numbers. Multiply them together. DON'T add 1!
–
Bjorn PoonenJan 11 '10 at 6:13

6

But what if there is only one composite number!?
–
Matt NoonanJan 11 '10 at 6:27

2 Answers
2

Here's a possible intended solution to show that $30031 = 2 \cdot 3 \cdot 5 \cdot 7 \cdot 11 \cdot 13 + 1$ is composite without factoring it. Recall the Fermat primality test: if $a^{n-1} \not \equiv 1 \bmod n$, then $n$ cannot be prime. It turns out that $2^{30030} \equiv 21335 \bmod 30031$, so $30031$ must indeed be composite. There is a well-known algorithm called binary exponentiation that is reasonably fast to implement by hand and that could conceivably be done on an exam. (I am not totally convinced that this would be faster than trial division until $p = 59$, though. And if you followed Leonid's suggestion in the comments your life would be even easier.)

Edit: Here is the solution by trial division. It suffices to check the primes from $17$ up. Note that the fact that we know the prime factorization of $30030$ helps a lot. All of the arithmetic necessary beyond what I wrote down was mental.

I don't know a non-computational solution to this question, or even a computational solution that wouldn't make one annoyed not to be allowed to use a calculator or computer. I don't know of any theoretical reason why the statement is false, and there are similar questions involving Euclid sequences that remain open: see e.g. Problem 6 of

I am a professional mathematician specializing in number theory who has thought at least a little bit about similar problems in the context of teaching advanced undergraduate number theory. (I am not the world's greatest problem solver, but some of the people who have already commented on this question and not given a solution meeting the criteria above are about as quick and clever as they come.) So I submit that if I cannot solve the question in a nice way, then it is not reasonable to be able to expect an undergraduate to do so on an in-class exam.

I believe John Nash put unsolved problems in his exams, because he thought that if the students did not realize how hard they were, they might actually be able to solve them!
–
EmilJan 11 '10 at 10:25

There's a story about a famous result in computer science being solved in exactly that way, although I don't remember which one it is at the moment.
–
Qiaochu YuanJan 11 '10 at 12:45

@Qiaochu - Perhaps you're thinking of George Dantzig? He arrived late to a class and confused two open problems that the prof had written on the board for homework. A few days later he turned in their solutions!
–
Ben LinowitzJan 11 '10 at 12:49

Thanks, now I'm more convinced that I should stop(at least until I get a little more advanced in math=)) searching for a qualitative, non-computational answer.
–
kolistivraJan 11 '10 at 15:33