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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A143933 a(n) is the smallest prime x such that x^2-n! is also prime. 3
2, 2, 3, 11, 19, 31, 79, 211, 607, 1931, 6337, 21961, 78919, 295291, 1143563, 4574149, 18859777, 80014843, 348776611, 1559776279, 7147792903, 33526120129, 160785623729, 787685471519, 3938427356629, 20082117944579, 104349745809137, 552166953567737 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Every prime > 3 in this sequence is bigger than the n-th prime, see comment to A121926. For the smallest number x such that x^2-n! is prime see A143931. For the smallest prime numbers of the form x^2-n! see A143932.

LINKS

Robert Israel, Table of n, a(n) for n = 1..300

MAPLE

f:= proc(n) local p, t;

  t:= n!;

  p:= floor(sqrt(t));

  do

    p:= nextprime(p);

    if isprime(p^2-t) then return p fi

  od

end proc:

map(f, [$1..28]); # Robert Israel, Feb 10 2019

MATHEMATICA

f[n_] := Block[{p = NextPrime[ Sqrt[ n!]]}, While[ !PrimeQ[p^2 - n!], p = NextPrime@ p]; p]; Array[f, 27] (* Robert G. Wilson v, Jan 08 2015 *)

PROG

(PARI) a(n)=my(N=n!, x=sqrtint(N)+1); while(!isprime(x^2-N), x=nextprime(x+1)); x \\ Charles R Greathouse IV, Dec 09 2014

CROSSREFS

Cf. A121926, A143931, A143932.

Sequence in context: A067919 A157301 A143931 * A284708 A265783 A246670

Adjacent sequences:  A143930 A143931 A143932 * A143934 A143935 A143936

KEYWORD

nonn

AUTHOR

Artur Jasinski, Sep 05 2008

EXTENSIONS

Corrected by Charles R Greathouse IV, Dec 09 2014

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 08:41 EST 2021. Contains 349627 sequences. (Running on oeis4.)