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.
%I A051800 #29 May 30 2023 08:27:00 %S A051800 1,2,3,4,5,11,18,23,26,30,80,120,148,220,395,776,884,977,3535,3927 %N A051800 Numbers k such that 1 plus twice the product of the first k primes is also a prime. %e A051800 5 is in the sequence because 2*(2*3*5*7*11) + 1 = 4621 is prime. %t A051800 Position[2#+1&/@FoldList[Times,Prime[Range[800]]],_?PrimeQ]//Flatten (* _Harvey P. Dale_, Oct 09 2018 *) %o A051800 (PARI) isok(k) = isprime(1+2*prod(j=1, k, prime(j))); \\ _Michel Marcus_, May 28 2018 %o A051800 (Python) %o A051800 from sympy import isprime, nextprime %o A051800 def afind(limit): %o A051800 p, primorialk = 2, 2 %o A051800 for k in range(1, limit+1): %o A051800 if isprime(2*primorialk + 1): %o A051800 print(k, end=", ") %o A051800 p = nextprime(p) %o A051800 primorialk *= p %o A051800 afind(400) # _Michael S. Branicky_, Dec 24 2021 %Y A051800 2*A002110(n)+1 is prime. Cf. A051887, A051915. %K A051800 nonn,more %O A051800 1,2 %A A051800 _Labos Elemer_, Dec 20 1999 %E A051800 More terms from _Harvey P. Dale_, Oct 09 2018 %E A051800 a(17)-a(18) from _Michael S. Branicky_, Dec 24 2021 %E A051800 a(19)-a(20) from _Michael S. Branicky_, May 30 2023