login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A190617 The smallest prime q <= prime(n) such that 1 + q# * prime(n)# is prime, or 0 if no such q exists. 1

%I #14 Feb 19 2019 03:54:44

%S 2,2,2,2,2,3,0,19,13,13,2,11,0,3,0,7,3,2,0,0,3,0,2,0,7,2,0,0,7,2,0,0,

%T 5,13,17,5,0,29,73,53,0,41,17,0,61,113,67,0,23,7,31,53,3,0,0,109,13,

%U 43,101,67,113,0,181,37,23

%N The smallest prime q <= prime(n) such that 1 + q# * prime(n)# is prime, or 0 if no such q exists.

%C The notation # refers to the primorials A002110, the partial products of primes.

%C Roughly 75% of the entries are nonzero.

%C For roughly 50% of the solutions (that is roughly 1/3 of all entries if zeros are included) the q are smaller than prime(n)/5.

%H Pierre CAMI, <a href="/A190617/b190617.txt">Table of n, a(n) for n = 1..750</a>

%e 2*2 + 1 = 5 (prime) with q=2, q#=2, prime(n)# = 2 so a(1)=2.

%e 2*2*3 + 1 = 13 (prime) with q=2, q#=2, prime(2)# = 2*3 so a(2)=2.

%e 2*2*3*5 + 1 = 61 (prime) with q=2, q#=2, prime(3)# = 2*3*5 so a(3)=2.

%e 2*2*3*5*7 + 1 = 421 (prime) with q=2, q#=2, prime(4)# = 2*3*5*7 so a(4)=2.

%p A002110 := proc(n) option remember; mul(ithprime(i),i=1..n) ; end proc:

%p A190617 := proc(n) local psharp ; psharp := A002110(n) ; for i from 1 to n do if isprime(1+psharp*A002110(i)) then return ithprime(i) ; end if; end do: return 0 ; end proc:

%p seq(A190617(n),n=1..80) ; # _R. J. Mathar_, Jun 02 2011

%o PFGW from Primeformgroup for prime search and certification

%o pfgw64 -f in.txt ,results in pfgw-prime.log and pfgw.log

%o in.txt scriptyfile

%o SCRIPT

%o DIM nn,0

%o DIM kk

%o DIM mm

%o DIM jj

%o DIMS tt

%o LABEL loopn

%o SET nn,nn+1

%o IF nn>750 THEN END

%o SET kk,p(nn)

%o SET mm,0

%o LABEL loopm

%o SET mm,mm+1

%o IF mm>nn THEN GOTO loopn

%o SET jj,p(mm)

%o SETS tt,%d,%d\,;kk;jj

%o PRP kk#*(jj#)+1,tt

%o IF ISPRIME THEN GOTO loopn

%o IF ISPRP THEN GOTO loopn

%o goto loopm

%K nonn

%O 1,1

%A _Pierre CAMI_, May 14 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 03:51 EDT 2024. Contains 374291 sequences. (Running on oeis4.)