login
A268686
Number of primes that are of form (prime(k)+prime(n))/2 for k=1..n-1, offset=2.
1
0, 0, 1, 1, 0, 1, 2, 2, 2, 2, 0, 2, 3, 1, 3, 3, 1, 2, 4, 2, 4, 4, 4, 2, 3, 4, 3, 3, 5, 5, 5, 4, 5, 4, 5, 3, 5, 5, 6, 4, 4, 7, 3, 6, 7, 6, 7, 5, 4, 5, 4, 6, 8, 7, 7, 7, 7, 3, 8, 9, 8, 5, 9, 5, 7, 8, 4, 8, 8, 10, 8, 6, 6, 10, 9, 9, 6, 7, 6, 9, 9, 9, 8, 8, 12, 13, 8, 10, 12, 11, 12, 10, 11, 8, 12, 12, 12, 10, 9, 13, 8, 10, 13, 8, 9, 10, 10, 11, 12, 13, 8, 14
OFFSET
2,7
COMMENTS
We choose offset=2 because there are no primes less than a(1)=2.
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
Sequence in context: A215884 A305029 A097033 * A113306 A181089 A341894
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 10 2016
STATUS
approved