A264721 Composite numbers that are greater than the average of their closest flanking primes.
10, 16, 22, 27, 28, 35, 36, 40, 46, 51, 52, 57, 58, 65, 66, 70, 77, 78, 82, 87, 88, 94, 95, 96, 100, 106, 112, 121, 122, 123, 124, 125, 126, 130, 135, 136, 145, 146, 147, 148, 155, 156, 161, 162, 166, 171, 172, 177, 178, 187, 188, 189, 190, 196, 206, 207, 208
Offset: 1
Examples
a(7) = 36 because 36 > (31 + 37)/2 = 34.
Links
- Chris Boyd, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range@ 208, And[CompositeQ@ #, # > (Abs@ NextPrime[#, -1] + NextPrime@ #)/2] &] (* Michael De Vlieger, Nov 22 2015 *)
-
PARI
test(n)= {if(n-precprime(n-1)>nextprime(n+1)-n&&n>2&&!isprime(n),return(1),return(0))} for(i=1,200,if(test(i),print1(i,", ")))
Comments