login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Number of primes that are of form (prime(k)+prime(n))/2 for k=1..n-1, offset=2.
1

%I #7 Feb 18 2016 04:04:46

%S 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,

%T 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,

%U 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

%N Number of primes that are of form (prime(k)+prime(n))/2 for k=1..n-1, offset=2.

%C We choose offset=2 because there are no primes less than a(1)=2.

%H Zak Seidov, <a href="/A268686/b268686.txt">Table of n, a(n) for n = 2..10000</a>

%e a(2)=0 because (2+3)/2 is not prime;

%e a(3)=0 because (2+5)/2 and(3+5)/2 are not prime;

%e a(4)=1 because among 3 numbers ({2,3,5}+7)/2 = {9/2, 5, 6} the only prime is 5;

%e 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;

%e 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.

%e a(20)=4 with 4 primes 37,41,47,59.

%t 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*)

%K nonn

%O 2,7

%A _Zak Seidov_, Feb 10 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 23 13:10 EDT 2024. Contains 376164 sequences. (Running on oeis4.)