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!)
A075409 a(n) is the smallest m such that n!-m and n!+m are both primes. 5
0, 1, 5, 7, 19, 19, 31, 17, 11, 17, 83, 67, 353, 227, 163, 59, 61, 113, 353, 31, 1447, 571, 389, 191, 337, 883, 101, 1823, 659, 709, 163, 1361, 439, 307, 1093, 1733, 2491, 1063, 1091, 1999, 1439, 109, 2753, 607, 2617, 269, 103, 2663, 337, 14447, 2221, 5471, 2887 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
COMMENTS
For n=3,5,10,21,171,190,348, n! is an interprime, the average of two consecutive primes, see A053709. In general n! may be average of several pairs of primes, in which case the minimal distance is in the sequence. See also n^n and n!! as average of two primes in A075468 and A075410.
According to Goldbach's conjecture, a(n) always exists with a(n) = A047160(n!). - Jens Kruse Andersen, Jul 30 2014
LINKS
EXAMPLE
a(4)=5 because 4!=24 and 19 and 25 are primes with smallest distance 5 from 4!.
MATHEMATICA
smp[n_]:=Module[{m=1, nf=n!}, While[!PrimeQ[nf+m]||!PrimeQ[nf-m], m=m+2]; m]; Join[{0}, Array[smp, 60, 3]] (* Harvey P. Dale, Apr 18 2014 *)
PROG
(PARI) a(n) = {my (m=0); until (ok, ok = isprime(n!-m) && isprime(n!+m); if (!ok, m++); ); return (m); } \\ Michel Marcus, Apr 19 2013
CROSSREFS
Sequence in context: A349170 A046151 A046078 * A258655 A174362 A268608
KEYWORD
nonn
AUTHOR
Zak Seidov, Sep 18 2002
EXTENSIONS
More terms from David Wasserman, Jan 17 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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)