A305076 Numbers k such that prime(k)^k - primorial(k - 1) is prime.
2, 4, 5, 8, 9, 15, 29, 213, 666, 1360, 3932, 7916
Offset: 1
Examples
n = 1 gives 2 - 1 = 1. n=2 gives 3^2 - 2 = 7, so 2 is the first term.
Programs
-
Maple
N:=2000: for X from 1 to N do Z:=mul(ithprime(i),i=1..(X-1)); Y:=(ithprime(X)^X - Z); if isprime(Y) then print(X); end if end do:
-
Mathematica
Select[Range@ 700, PrimeQ[Prime[#]^# - Product[Prime@ i, {i, # - 1}]] &] (* Michael De Vlieger, Jul 19 2018 *)
-
PARI
isok(k) = isprime(prime(k)^k - prod(j=1, k-1, prime(j))); \\ Michel Marcus, Jun 09 2018
Extensions
a(12) from Michael S. Branicky, Jun 11 2024
Comments