OFFSET
1,1
COMMENTS
The Mathematica program gives the first 53 terms.
The Mathematica program is also good for finding sequences with any odd number of terms.
LINKS
Lei Zhou, Table of n, a(n) for n = 1..10000
EXAMPLE
{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)
{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)
MATHEMATICA
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}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lei Zhou, Oct 07 2011
STATUS
approved