The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245697 Least number k such that (n!+k)/n and (n!-k)/n are both prime. 3

%I #10 Jul 30 2014 09:19:35

%S 0,4,25,42,133,152,279,170,121,204,1079,938,5295,3632,2771,1062,1159,

%T 2260,7413,682,33281,13704,9725,4966,9099,24724,2929,54690,20429,

%U 22688,5379,46274,15365,11052,40441,65854,97149,42520,44731,83958,61877,4796,123885,27922,122999,12912,5047

%N Least number k such that (n!+k)/n and (n!-k)/n are both prime.

%C a(n) < n! for all n > 2.

%C It is believed that a(n) exists for all n > 2.

%C a(n) = n times (least m such that (n-1)!+m and (n-1)!-m are both prime) = n*A075409(n-1). - _Jens Kruse Andersen_, Jul 30 2014 [Goldbach's conjecture would then imply that a(n) always exists.]

%H Jens Kruse Andersen, <a href="/A245697/b245697.txt">Table of n, a(n) for n = 3..101</a>

%e (4!+4)/4 = 7 is prime and (4!-4)/4 = 5 is prime. Thus a(4) = 4.

%o (PARI)

%o a(n)=for(k=0,10^7,s1=(n!-k)/n;s2=(n!+k)/n;if(floor(s1)==s1&&floor(s2)==s2,if(ispseudoprime(s1)&&ispseudoprime(s2),return(k))))

%o n=3;while(n<100,print1(a(n),", ");n++)

%Y Cf. A075409, A245695, A245696.

%K nonn

%O 3,2

%A _Derek Orr_, Jul 29 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 23:42 EDT 2024. Contains 372703 sequences. (Running on oeis4.)