cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A075409 a(n) is the smallest m such that n!-m and n!+m are both primes.

This page as a plain text file.
%I A075409 #17 Jul 30 2014 09:17:35
%S A075409 0,1,5,7,19,19,31,17,11,17,83,67,353,227,163,59,61,113,353,31,1447,
%T A075409 571,389,191,337,883,101,1823,659,709,163,1361,439,307,1093,1733,2491,
%U A075409 1063,1091,1999,1439,109,2753,607,2617,269,103,2663,337,14447,2221,5471,2887
%N A075409 a(n) is the smallest m such that n!-m and n!+m are both primes.
%C A075409 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.
%C A075409 According to Goldbach's conjecture, a(n) always exists with a(n) = A047160(n!). - _Jens Kruse Andersen_, Jul 30 2014
%H A075409 Vincenzo Librandi, <a href="/A075409/b075409.txt">Table of n, a(n) for n = 2..100</a>
%e A075409 a(4)=5 because 4!=24 and 19 and 25 are primes with smallest distance 5 from 4!.
%t A075409 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 *)
%o A075409 (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
%Y A075409 Cf. A033932, A033933, A047160, A053709, A075468, A075410.
%K A075409 nonn
%O A075409 2,3
%A A075409 _Zak Seidov_, Sep 18 2002
%E A075409 More terms from _David Wasserman_, Jan 17 2005