login
Numbers m such that there is at least one k < prime(m+1) such that k*(prime(m)#)^2 - 1 and k*(prime(m)#)^2 + 1 are twin primes.
2

%I #10 Nov 14 2018 08:13:57

%S 1,2,3,4,5,10,16,18,24,31,32,35,38,51,58,71,75,78

%N Numbers m such that there is at least one k < prime(m+1) such that k*(prime(m)#)^2 - 1 and k*(prime(m)#)^2 + 1 are twin primes.

%e 2 is a term because the 2nd primorial is 6, and both 2*36-1 & 2*36+1 are primes, with corresponding k=2.

%o (PARI) isok(n) = {my(q = nextprime(prime(n)+1)); for (k=1, q, x = k*prod(i=1, n, prime(i))^2; if (isprime(x-1) && isprime(x+1), return (1));); 0;} \\ _Michel Marcus_, Nov 14 2018

%Y Cf. A099160 (corresponding primes), A099162 (k values).

%K nonn,more

%O 1,2

%A _Pierre CAMI_, Oct 01 2004