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.

A092970 Smallest prime of the form n!/k + 1. k < = n, or 0 if no such prime exists.

This page as a plain text file.
%I A092970 #5 Jan 15 2019 16:18:58
%S A092970 2,2,3,7,31,181,1009,13441,45361,453601,3991681,39916801,566092801,
%T A092970 10897286401,130767436801,2988969984001,25406244864001,0,
%U A092970 8109673360588801,304112751022080001,2688996956405760001
%N A092970 Smallest prime of the form n!/k + 1. k < = n, or 0 if no such prime exists.
%e A092970 a(10) = 453601 = 10!/8 + 1, as 10!/10 + 1 and 10!/9 + 1 are both composite.
%t A092970 Table[SelectFirst[Reverse[n!/Range[n]+1],PrimeQ],{n,30}]/.(Missing[ "NotFound"] -> 0) (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jan 15 2019 *)
%o A092970 (PARI) a(n)=for (i=1,n,if(isprime(n!/(n-i+1)+1),return((n!/(n-i+1)+1))))
%Y A092970 Cf. A092968, A092969, A092068.
%K A092970 nonn
%O A092970 1,1
%A A092970 _Amarnath Murthy_, Mar 26 2004
%E A092970 Corrected and extended by Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004