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.

A139439 Numbers n such that primorial(n)/2 + 4 is prime.

This page as a plain text file.
%I A139439 #27 Apr 29 2021 01:46:29
%S A139439 1,2,3,4,7,18,21,70,76,323,340,556,572,3433,5457,5897,10820
%N A139439 Numbers n such that primorial(n)/2 + 4 is prime.
%C A139439 a(17) > 25000. - _Robert Price_, Nov 11 2016
%t A139439 k=1/2;a={};Do[k=k*Prime[n];If[PrimeQ[k+4], Print[n];AppendTo[a, n]], {n, 600}];a (* _Vladimir Joseph Stephan Orlovsky_, Aug 20 2008; corrected by _Ray Chandler_, Jun 16 2013 *)
%t A139439 Position[#/2+4&/@FoldList[Times, Prime[Range[600]]],_?(PrimeQ[#]&)]// Flatten (* The program generates the first 13 terms of the sequence. To generate more, increase the Range constant,but the program may take a long time to run.*) (* _Harvey P. Dale_, Mar 20 2021 *)
%o A139439 (PARI) n=0; t=1/2; forprime(p=2,1e9, n++; t*=p; if(ispseudoprime(t+4), print1(n", "))) \\ _Charles R Greathouse IV_, Apr 28 2015
%Y A139439 Cf. A067026, A067027, A139439-A139457, A103514.
%K A139439 nonn,more
%O A139439 1,2
%A A139439 _Artur Jasinski_, Apr 21 2008
%E A139439 a(1)=1 inserted and a(12)-a(13) from _Ray Chandler_, Jun 16 2013
%E A139439 a(14)-a(16) from _Robert Price_, Nov 11 2016