The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 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 Vincenzo Librandi, Table of n, a(n) for n = 2..100 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 Cf. A033932, A033933, A047160, A053709, A075468, A075410. Sequence in context: A116623 A046151 A046078 * A258655 A174362 A268608 Adjacent sequences:  A075406 A075407 A075408 * A075410 A075411 A075412 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 24 03:27 EDT 2021. Contains 345415 sequences. (Running on oeis4.)