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.

A143933 a(n) is the smallest prime x such that x^2-n! is also prime.

This page as a plain text file.
%I A143933 #18 Feb 10 2019 18:58:10
%S A143933 2,2,3,11,19,31,79,211,607,1931,6337,21961,78919,295291,1143563,
%T A143933 4574149,18859777,80014843,348776611,1559776279,7147792903,
%U A143933 33526120129,160785623729,787685471519,3938427356629,20082117944579,104349745809137,552166953567737
%N A143933 a(n) is the smallest prime x such that x^2-n! is also prime.
%C A143933 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.
%H A143933 Robert Israel, <a href="/A143933/b143933.txt">Table of n, a(n) for n = 1..300</a>
%p A143933 f:= proc(n) local p,t;
%p A143933   t:= n!;
%p A143933   p:= floor(sqrt(t));
%p A143933   do
%p A143933     p:= nextprime(p);
%p A143933     if isprime(p^2-t) then return p fi
%p A143933   od
%p A143933 end proc:
%p A143933 map(f, [$1..28]); # _Robert Israel_, Feb 10 2019
%t A143933 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 *)
%o A143933 (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
%Y A143933 Cf. A121926, A143931, A143932.
%K A143933 nonn
%O A143933 1,1
%A A143933 _Artur Jasinski_, Sep 05 2008
%E A143933 Corrected by _Charles R Greathouse IV_, Dec 09 2014