login
Primes p such that, for p < q < r three consecutive primes, p + 2q + 2r, 2p + q + 2r and 2p + 2q + r are all primes.
1

%I #13 Feb 03 2017 21:46:31

%S 10193,12113,17683,19501,63743,70793,74317,74797,79657,89231,109073,

%T 112657,114371,116993,119237,120431,130211,139801,148573,152123,

%U 164881,173867,201623,230017,264919,275543,284927,290761,323537,325643,371873,382777,385193,396061,399403,402817,415201,421273

%N Primes p such that, for p < q < r three consecutive primes, p + 2q + 2r, 2p + q + 2r and 2p + 2q + r are all primes.

%C From first 10^5 primes, only 92 are terms. Indices of primes are 1252, 1451, 2032,..., 95460, 97950, 98973.

%C Note that p == q == r (mod 6), e.g., {10193, 10211, 10223} == 5 mod 6 and {17683, 17707, 17713} == 1 mod 6.

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

%e a(1) = p = 10193; s = {p, q, r} = {10193, 10211, 10223};

%e {{1,2,2}.s, {2,1,2}.s, {2,2,1}.s} = {51061, 51043, 51031} all primes.

%t pr=Partition[Prime[Range[40000]],3,1]; Reap[Do[s=pr[[k]]; If[Union[PrimeQ[{{1,2,2}.s,{2,1,2}.s,{2,2,1}.s}]]=={True},Sow[Prime[k]]],{k,Length[pr]}]][[2,1]]

%t tcpQ[{p_,q_,r_}]:=AllTrue[{p+2q+2r,2p+q+2r,2p+2q+r},PrimeQ]; Select[ Partition[ Prime[Range[36000]],3,1],tcpQ][[All,1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Feb 03 2017 *)

%K nonn

%O 1,1

%A _Zak Seidov_, Mar 15 2013