A128421 Numbers k such that p(k)# + p(k+1)# + 1 is prime, where p(k)# is the product of first k primes (A002110).
2, 3, 4, 5, 6, 8, 20, 56, 101, 108, 141, 202, 265, 364, 401, 1035, 1588, 3062, 4191, 4579, 10373
Offset: 1
Programs
-
Mathematica
Module[{nn=450,prmrl},prmrl=Partition[FoldList[Times,Prime[Range[nn]]],2,1];Position[prmrl,?(PrimeQ[#[[1]]+#[[2]]+ 1]&),1,Heads-> False]]//Flatten (* The program generates the first 15 terms of the sequence. *) (* _Harvey P. Dale, Sep 26 2024 *)
-
PARI
pd(n)=prod(i=1,n,prime(i)) \\ A002110 for(k=1,10^4,a=pd(k)+pd(k+1)+1;if(isprime(a),print1(k,", "))) \\ Alexandru Petrescu,Jun 17 2022
Extensions
Corrected by Emeric Deutsch, Mar 06 2007
Edited by Ray Chandler, Mar 13 2007
a(21) from Michael S. Branicky, Oct 01 2024