%I #8 Jan 28 2023 17:08:16
%S 2,3,5,6,7,8,10,13,14,17,20,26,28,29,33,35,41,43,45,49,52,57,60,64,69,
%T 81,83,85,89,90,91,98,104,109,113,116,120,134,140,142,144,148,152,171,
%U 173,176,178,182,190,201,202,204,206,209,212,215,225,230,234
%N Numbers for which c(n) - 1 and c(n) + 1 are twin primes, where c(n) = A061214(n) = product of composite numbers between prime(n) and prime(n+1) .
%H Harvey P. Dale, <a href="/A229993/b229993.txt">Table of n, a(n) for n = 2..1000</a>
%e c(n) - 1: 3, 5, 719, 11, 3359, 17, 9239.
%e c(n) + 1: 5, 7, 721, 13, 3361, 19, 9241. Here, for example, for we have twin primes except for n = 4, since 721 is not prime.
%t z = 400; c[n_] := Product[k, {k, Prime[n] + 1, Prime[n + 1] - 1}]; d[n_] := If[PrimeQ[c[n] - 1], 1, 0]; t1 = Table[d[n], {n, 1, z}]; u1 = Flatten[Position[t1, 1]]; e[n_] := If[PrimeQ[c[n] + 1], 1, 0]; t2 = Table[e[n], {n, 1, z}]; u2 = Flatten[Position[t2, 1]]; u = Intersection[u1, u2]
%t pcnQ[n_]:=Module[{p=Times@@Range[Prime[n]+1,Prime[n+1]-1]},AllTrue[p+{1,-1},PrimeQ]]; Select[Range[250],pcnQ] (* _Harvey P. Dale_, Jan 28 2023 *)
%Y Cf. A061214, A229991, A229992.
%K nonn
%O 2,1
%A _Clark Kimberling_, Oct 09 2013