OFFSET
1,1
COMMENTS
The first set of 4 prime-indexed primes in arithmetic progression (353, 431, 509, and 587) contains consecutive terms of A142160.
EXAMPLE
a(4) = 587 because 353 = prime(prime(20)), 431 = prime(prime(23)), 509 = prime(prime(25)), 587 = prime(prime(28)), and 431-353 = 509-431 = 587-509 = 78.
From Charles R Greathouse IV, Nov 27 2016: (Start)
The corresponding arithmetic progressions are
3;
3, 5;
5, 11, 17;
353, 431, 509, 587;
13297, 21937, 30577, 39217, 47857;
1561423, 2716423, 3871423, 5026423, 6181423, 7336423;
and with the main diagonal being terms of this sequence. (End)
PROG
(PARI) findAP(len)=my(t); if(len<3, return(v[len])); for(i=len, #v, for(j=1, i-len+1, t=(v[i]-v[j])/(len-1); if(denominator(t)>1, next); forstep(k=v[j]+t, v[i]-t, t, if(!setsearch(v, k), next(2))); return(vector(len, k, v[j]+(k-1)*t)))); "not found"
listPIP(lim)=my(v=List(), p); forprime(q=2, lim, if(isprime(p++), listput(v, q))); Vec(v)
v=listPIP(1e7);
apply(findAP, [1..6]) \\ Charles R Greathouse IV, Nov 27 2016
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Bobby Jacobs, Nov 27 2016
EXTENSIONS
a(7) from Charles R Greathouse IV, Dec 27 2016
STATUS
approved