login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers k such that prime(k)^k - primorial(k - 1) is prime.
1

%I #28 Jun 11 2024 09:44:23

%S 2,4,5,8,9,15,29,213,666,1360,3932,7916

%N Numbers k such that prime(k)^k - primorial(k - 1) is prime.

%C Numbers k such that A304917(k) is prime.

%C a(12) > 4000 if it exists.

%e n = 1 gives 2 - 1 = 1. n=2 gives 3^2 - 2 = 7, so 2 is the first term.

%p N:=2000:

%p for X from 1 to N do

%p Z:=mul(ithprime(i),i=1..(X-1));

%p Y:=(ithprime(X)^X - Z);

%p if isprime(Y) then print(X);

%p end if

%p end do:

%t Select[Range@ 700, PrimeQ[Prime[#]^# - Product[Prime@ i, {i, # - 1}]] &] (* _Michael De Vlieger_, Jul 19 2018 *)

%o (PARI) isok(k) = isprime(prime(k)^k - prod(j=1, k-1, prime(j))); \\ _Michel Marcus_, Jun 09 2018

%Y Cf. A062457, A002110, A304917.

%K nonn,more

%O 1,1

%A _David James Sycamore_, May 24 2018

%E a(12) from _Michael S. Branicky_, Jun 11 2024