View Single Post
Old 2017-04-20, 17:33   #10
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

86816 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Are you saying n! +1 up to n!+n are all composite? I must not understand what you mean by "anything between 1 and n", because there are lots of examples where n!+1 are prime.
Apologies for not being clear.
What I mean is to find an integer addend (excluding 1, so restricting the addend to primes would also suffice) to a n!, which sum up to a prime. You could start your brute force trial from next-prime(n+1). Any addend m where 1 < m <= n, to n!, would sum up to a composite. Not trying out 1 < m <= n would not be a major time saver but could show up in a measurable fractions of a second faster executions.
Please let me know if there are any issues or questions.

Last fiddled with by a1call on 2017-04-20 at 18:25
a1call is offline   Reply With Quote