login
Numbers n such that exactly one of 3*prime(n)-4 and 3*prime(n)+4 is prime.
1

%I #7 May 08 2019 17:12:58

%S 1,4,6,7,9,10,12,13,15,16,18,19,21,26,27,28,29,34,35,37,40,41,42,45,

%T 48,49,54,57,58,59,60,61,62,66,67,70,71,73,74,76,78,82,84,85,88,92,95,

%U 101,102,103,105,108,109,113,114,115,117,120,123,124,125,126,127,130,134

%N Numbers n such that exactly one of 3*prime(n)-4 and 3*prime(n)+4 is prime.

%H Harvey P. Dale, <a href="/A174258/b174258.txt">Table of n, a(n) for n = 1..1000</a>

%e a(1)=1 because 3*prime(1)-4=2 is prime and 3*prime(1)+4=10 is composite; a(2)=4 because 3*prime(4)-4=17 is prime and 3*prime(4)+4=25 is composite.

%t Select[Range[200],Total[Boole[PrimeQ[3Prime[#]+{4,-4}]]]==1&] (* _Harvey P. Dale_, May 08 2019 *)

%K nonn,easy

%O 1,2

%A _Juri-Stepan Gerasimov_, Mar 14 2010

%E Corrected by _Charles R Greathouse IV_, Mar 19 2010