A264722 Composite numbers that are less than the average of their closest flanking primes.
8, 14, 20, 24, 25, 32, 33, 38, 44, 48, 49, 54, 55, 62, 63, 68, 74, 75, 80, 84, 85, 90, 91, 92, 98, 104, 110, 114, 115, 116, 117, 118, 119, 128, 132, 133, 140, 141, 142, 143, 152, 153, 158, 159, 164, 168, 169, 174, 175, 182, 183, 184, 185, 194, 200, 201, 202, 203
Offset: 1
Examples
a(7) = 33 because 33 < (31 + 37)/2 = 34.
Links
- Chris Boyd, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range@ 204, And[CompositeQ@ #, # < (NextPrime[#, -1] + NextPrime@ #)/2] &] (* Michael De Vlieger, Nov 22 2015 *) Range[#[[1]]+1,Total[#]/2 -1]&/@Select[Partition[Prime[Range[50]],2,1], #[[2]]- #[[1]]>2&]//Flatten (* Harvey P. Dale, Jul 28 2020 *)
-
PARI
test(n)= {if(n-precprime(n-1)
2&&!isprime(n),return(1),return(0))} for(i=1,200,if(test(i),print1(i,", ")))
Comments