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!)
A075757 Smallest positive integer k such that n!+k!+1 is prime, or 0 if no such k exists. 2

%I #8 Jun 24 2014 01:08:26

%S 1,2,3,3,3,3,8,7,10,9,17,7,9,8,19,7,11,11,15,15,11,14,7,20,31,13,7,0,

%T 13,0,25,20,7,23,23,21,7,19,21,0,52,7,23,13,13,17,50,8,76,19,51,41,7,

%U 107,57,27,55,0,55,0,27,29,0,79,0,45,61,48,55,39,80,56,153,76,0,35,11

%N Smallest positive integer k such that n!+k!+1 is prime, or 0 if no such k exists.

%e 3!=6, 6+1!+1=8, 6+2!+1=9, 6+3!+1=13, which is prime, so a(3)=3.

%t a[1]=1; a[n_] := For[k=2, True, k++, If[Mod[n!+1, k]==0, Return[0]]; If[ProvablePrimeQ[n!+k!+1], Return[k]]] (* First do <<NumberTheory`PrimeQ` *)

%K nonn

%O 1,2

%A _Jon Perry_, Oct 08 2002

%E Edited by _Dean Hickerson_, Oct 10 2002

%E The fact that 73!+153!+1 is prime, so a(73)=153, was proved, using Primo, by _Robert G. Wilson v_, Oct 16 2002

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 June 13 00:51 EDT 2024. Contains 373362 sequences. (Running on oeis4.)