OFFSET
2,7
COMMENTS
We choose offset=2 because there are no primes less than a(1)=2.
LINKS
Zak Seidov, Table of n, a(n) for n = 2..10000
EXAMPLE
a(2)=0 because (2+3)/2 is not prime;
a(3)=0 because (2+5)/2 and(3+5)/2 are not prime;
a(4)=1 because among 3 numbers ({2,3,5}+7)/2 = {9/2, 5, 6} the only prime is 5;
a(6)=0 because prime(6)=13 among 5 numbers ({2,3,5,7,11}+13)/2 = {7/2,8,9,10,12} there is no primes;
a(10)=2 because prime(10)=29 and (prime(i)+29)/2 for i=2,9 are{16,17,18,20,21,23,24,26} among which there are 2 primes, 17 and 23.
a(20)=4 with 4 primes 37,41,47,59.
MATHEMATICA
Reap[Do[c=0; Do[If[PrimeQ[(Prime[n]+Prime[k1])/2], c++], {k1, 1, n-1}]; Sow[c], {n, 2, 10000}]][[2, 1]]](* for first 9999 terms*)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 10 2016
STATUS
approved