A100604 Numbers k such that (prime(k)-1)! + prime(k)^3 is prime.
2, 3, 4, 28, 894
Offset: 1
Examples
a(3) = 4 because (prime(4)-1)! + prime(4)^3 = (7-1)! + 7^3 = 720 + 343 = 1063 is the 3rd prime of this form.
Programs
-
Mathematica
Select[Range[30],PrimeQ[(Prime[#]-1)!+Prime[#]^3]&] (* Harvey P. Dale, Jul 13 2022 *)
-
PARI
is(k) = ispseudoprime((prime(k)-1)! + prime(k)^3); \\ Jinyuan Wang, Apr 10 2020
Formula
Numbers k such that (prime(k)-1)! + prime(k)^3 is prime, where prime(k) is the k-th prime.
Extensions
a(5) from Michael S. Branicky, Jul 01 2024
Comments