[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Composite numbers that are greater than the average of their closest flanking primes.
4

%I #12 Nov 25 2015 20:53:02

%S 10,16,22,27,28,35,36,40,46,51,52,57,58,65,66,70,77,78,82,87,88,94,95,

%T 96,100,106,112,121,122,123,124,125,126,130,135,136,145,146,147,148,

%U 155,156,161,162,166,171,172,177,178,187,188,189,190,196,206,207,208

%N Composite numbers that are greater than the average of their closest flanking primes.

%C Composite numbers that are nearer to the immediately next prime than to the immediately previous prime.

%C Members of this sequence are the numbers C, necessarily composite, such that I_n < C < P_n+1, where P_n is the n-th odd prime and I_n the interprime (A024675) between P_n and P_n+1.

%C Prime-free subsequence of A264719.

%H Chris Boyd, <a href="/A264721/b264721.txt">Table of n, a(n) for n = 1..10000</a>

%e a(7) = 36 because 36 > (31 + 37)/2 = 34.

%t Select[Range@ 208, And[CompositeQ@ #, # > (Abs@ NextPrime[#, -1] + NextPrime@ #)/2] &] (* _Michael De Vlieger_, Nov 22 2015 *)

%o (PARI) test(n)= {if(n-precprime(n-1)>nextprime(n+1)-n&&n>2&&!isprime(n),return(1),return(0))}

%o for(i=1,200,if(test(i),print1(i,", ")))

%Y Cf. A264719, A264720, A264722.

%K nonn,easy

%O 1,1

%A _Chris Boyd_, Nov 21 2015