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.

A387039 Numbers k such that (p_k#)*(p_(k-1)#)+1, or A228593(k)+1 is prime.

This page as a plain text file.
%I A387039 #25 Aug 23 2025 09:56:45
%S A387039 1,2,3,4,5,6,11,12,35,617
%N A387039 Numbers k such that (p_k#)*(p_(k-1)#)+1, or A228593(k)+1 is prime.
%e A387039 4 is a term since (p_4#)(p_3#) + 1 = (7*5*3*2)(5*3*2) + 1 = 210*30 + 1 = 6301 is prime.
%p A387039 p:= proc(n) option remember; `if`(n<1, 1, p(n-1)*ithprime(n)) end:
%p A387039 q:= k-> isprime(p(k)*p(k-1)+1):
%p A387039 select(q, [$1..50])[];  # _Alois P. Heinz_, Aug 14 2025
%t A387039 Position[Times @@@ Partition[FoldList[Times, 1, Prime@ Range[400]], 2, 1] + 1, _?PrimeQ][[All, 1]] (* _Michael De Vlieger_, Aug 23 2025 *)
%o A387039 (PARI) isok(k) = isprime(vecprod(primes(k))*vecprod(primes(k-1))+1);
%Y A387039 Cf. A000040, A002110, A034386, A228593, A006094.
%K A387039 nonn,more
%O A387039 1,2
%A A387039 _Arsen Vardanyan_, Aug 14 2025
%E A387039 a(10) from _Michael S. Branicky_, Aug 14 2025