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.

A128421 Numbers k such that p(k)# + p(k+1)# + 1 is prime, where p(k)# is the product of first k primes (A002110).

This page as a plain text file.
%I A128421 #21 Oct 01 2024 20:44:58
%S A128421 2,3,4,5,6,8,20,56,101,108,141,202,265,364,401,1035,1588,3062,4191,
%T A128421 4579,10373
%N A128421 Numbers k such that p(k)# + p(k+1)# + 1 is prime, where p(k)# is the product of first k primes (A002110).
%t A128421 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 *)
%o A128421 (PARI) pd(n)=prod(i=1,n,prime(i)) \\ A002110
%o A128421 for(k=1,10^4,a=pd(k)+pd(k+1)+1;if(isprime(a),print1(k,", "))) \\ _Alexandru Petrescu_,Jun 17 2022
%Y A128421 Cf. A002110, A014545, A128420.
%K A128421 nonn,more
%O A128421 1,1
%A A128421 _Pierre CAMI_, Mar 02 2007
%E A128421 Corrected by _Emeric Deutsch_, Mar 06 2007
%E A128421 Edited by _Ray Chandler_, Mar 13 2007
%E A128421 a(21) from _Michael S. Branicky_, Oct 01 2024