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!)
A075758 Smallest k such that n!+k!-1 is prime, or 0 if no such k exists. 4
2, 1, 2, 3, 5, 4, 7, 4, 4, 6, 2, 8, 14, 8, 8, 4, 17, 7, 26, 7, 6, 12, 6, 14, 14, 16, 2, 27, 6, 33, 6, 36, 26, 7, 33, 18, 2, 18, 6, 36, 2, 18, 14, 20, 25, 14, 25, 0, 22, 24, 34, 16, 46, 61, 18, 7, 25, 38, 47, 47, 54, 79, 157, 97, 28, 23, 7, 137, 24, 46, 36, 25, 2, 214, 94, 40, 2, 96 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It is possible to prove a(48)=0: since 67 divides 48!-1 and thus all 48!+k!-1 for k>=67 are composite, it is sufficient to test all k<67 which was done by Robert G. Wilson v. Likewise 113 divides 111!-1, 797 divides 128!-1, 137 divides 135!-1, 163 divides 161!-1 etc. and therefore a(111)=a(128)=a(135)=a(161)=0.
From the previous comments follows that a(n)=0 if there is no k smaller than the smallest prime factor of n!-1 such that n!+k!-1 is prime.
LINKS
EXAMPLE
4!=24, 1!=1 but 24+1-1=24 is not prime. 24+2!-1=25, not prime 24+3!-1=29, prime, so a[4]=3
MATHEMATICA
a = {}; Do[k = 1; While[ ! PrimeQ[n! + k! - 1], k++ ]; a = Append[a, k], {n, 1, 47}]
PROG
(PARI) for (a=1, 100, c=0; for (b=1, 200, if (isprime(a!+b!-1), c=b; break)); if (c>0, print1(c, ", "), print1("0, ")))
CROSSREFS
Sequence in context: A127462 A106436 A363226 * A125596 A351962 A253026
KEYWORD
nonn
AUTHOR
Jon Perry, Oct 08 2002
EXTENSIONS
Edited by Ralf Stephan, Jun 01 2005
STATUS
approved

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 July 27 09:47 EDT 2024. Contains 374647 sequences. (Running on oeis4.)