login
a(n) is the prime number that is the center element (3rd) of a 5-terms arithmetic progression prime chain.
2

%I #14 May 20 2013 18:56:59

%S 17,29,67,71,89,97,101,131,163,167,173,191,193,197,211,233,241,257,

%T 263,269,283,307,313,317,337,347,373,419,433,443,449,457,461,463,467,

%U 479,491,503,509,521,523,547,577,599,601,607,617,619,631,641,643,677,683

%N a(n) is the prime number that is the center element (3rd) of a 5-terms arithmetic progression prime chain.

%C The Mathematica program gives the first 53 terms.

%C The Mathematica program is also good for finding sequences with any odd number of terms.

%H Lei Zhou, <a href="/A196938/b196938.txt">Table of n, a(n) for n = 1..10000</a>

%e {5,13,[17],23,29} is a 5-term arithmetic progression prime chain, so a(1)=17; (for all primes smaller than 17, no such chains exist)

%e {5,17,[29].41,53} is a 5-term arithmetic progression prime chain, so a(2)=29; (for all primes in between 17 and 29, no such chains exist)

%t terms = 5; max=53; i = 1; step = (terms - 1)/2; Table[While[i++; p = Prime[i]; found = 0; j = 0; While[j++; df = 6*j; (p > (step*df)) && (found == 0), found = 1; Do[If[(! PrimeQ[p - k*df]) || (! PrimeQ[p + k*df]), found = 0], {k,1, step}]]; found == 0]; p, {ct, 1, max}]

%Y Cf. A033451.

%K nonn,easy

%O 1,1

%A _Lei Zhou_, Oct 07 2011