For a positive integer x drawn at random between 1 and 20000 inclusively, determine the probability that (x!+1)/(x+1) is a prime number.
first there is a simple proof that x+1 must be prime
(x!+1)/(x+1) = x!/(x+1) + 1/(x+1)
If x+1 is not prime then all of its prime factors are less than x and thus factors of x!, thus x!/(x+1) is an integer, since 1/(x+1) is only an integer x=-2 then (x!+1)/(x+1) is only an integer when x+1 is prime. Thus we can drastically reduce the search space to the primes less than 20000. This reduces us from testing 20,000 values of x to only 2262. Making it feasable with a reasonably fast home computer.
Now I am currently using the following Mathematica code to search for solutions.
so far it has returned the following x values:
unfortunately I am currently at work and only have my netbook to run this code on. Doubt it will finish before my shift, if it is not I will continue running it on my faster dual core at home and should probably have full solution by morning. Otherwise if somebody has access to Mathematica on a faster computer feel free to run this code and report what you get.
Edited on July 30, 2010, 8:11 pm
I found this website
which shows a search for up to 10,000 giving only
so I have updated my search to start at the first prime after 10,000.
Edited on July 30, 2010, 8:57 pm
Posted by Daniel
on 2010-07-30 20:06:11