login
Numbers k for which k-th primorial + square of (k+1)-th prime is also a prime.
1

%I #26 Aug 09 2024 13:01:40

%S 1,2,3,4,6,13,19,28,41,66,85,371,437,726,924,1063,3401,6714

%N Numbers k for which k-th primorial + square of (k+1)-th prime is also a prime.

%C r = prime(n+1)^2 is the smallest possible composite number that, if added to the n-th primorial, might give a prime.

%F a(n) = A002110(n) + prime(n+1)^2 is prime; n so that A054758(n)=1.

%e a(5)=6, 6th primorial is 30030, square of 7th prime is 289, sum gives 30319, a prime.

%t Block[{a = {}, p = 1, q = 1}, Do[q = NextPrime[q]; If[PrimeQ[p + q^2], AppendTo[a, i]]; p *= q, {i, 1200}]; Rest[a] - 1] (* _Michael De Vlieger_, Jan 03 2021 *)

%o (PARI) isok(n) = ispseudoprime(prime(n+1)^2 + prod(j=1, n, prime(j))); \\ _Michel Marcus_, Aug 26 2019

%Y Cf. A002110, A054758, A106155, A245694.

%K nonn,more

%O 1,2

%A _Labos Elemer_, May 04 2000

%E a(12)-a(14) from _Michel Marcus_, Aug 26 2019

%E a(15)-a(16) (due to _Jon E. Schoenfield_ at A245694) from _Bill McEachen_, Jan 03 2021

%E a(17) from _Michael S. Branicky_, Jun 09 2023

%E a(18) from _Michael S. Branicky_, Aug 09 2024