Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Mar 17 2015 22:59:49
%S 5,7,11,11,13,17,17,0,23,23,0,29,0,31,37,0,37,43,41,43,47,0,0,53,53,0,
%T 59,0,0,67,0,67,71,71,0,79,0,0,89,83,0,89,0,0,101,0,97,101,101,0,109,
%U 107,0,131,113,0,127,0,0,131,0,127,131,0,0,137,137,0,179,0,0,149,0,0
%N Middle term of smallest arithmetic prime triple with common difference 2n (or 0 if no such prime exists).
%C n's for which no prime exists: 8, 11, 13, 16, 22, 23, 26, 28, 29, 31, 35, 37, 38, 41, 43, 44, 46, 50, 53, 56, 58, 59, 61, 64, 65, 68, 70, 71, 73, 74, 76, 79, 80, 83, 85, 86, 88, 91, 92, 97, 98, 100, ...
%t f[n_] := Block[{k = 2n + 1}, While[k < 10^5 && ! PrimeQ[k] || ! PrimeQ[k - 2n] || ! PrimeQ[k + 2n], k++ ]; If[k >= 10^5, 0, k]] (* _Robert G. Wilson v_ *)
%Y Cf. A098806.
%K nonn
%O 1,1
%A _Lekraj Beedassy_, Feb 28 2006
%E Corrected and extended by _Robert G. Wilson v_ and _Zak Seidov_, Feb 28 2006