A167705 Composite numbers having four composite nearest neighbors.
26, 34, 50, 56, 64, 76, 86, 92, 93, 94, 116, 117, 118, 119, 120, 121, 122, 123, 124, 134, 142, 143, 144, 145, 146, 154, 160, 170, 176, 184, 185, 186, 187, 188, 202, 203, 204, 205, 206, 207, 208, 214, 215, 216, 217, 218, 219, 220, 236, 244, 245, 246, 247, 248, 254, 260, 266, 274, 286, 287, 288, 289, 290, 296, 297, 298, 299, 300
Offset: 1
Examples
a(1)=26 (24,25,27,28 are composite nearest neighbors), a(2)=34 (32,33,35,36 are composite nearest neighbors).
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[6!], !PrimeQ[#]&&!PrimeQ[#-1]&&!PrimeQ[#+1]&&!PrimeQ[#-2]&&!PrimeQ[#+2]&] (* Vladimir Joseph Stephan Orlovsky, Dec 26 2010 *) Flatten[Position[Partition[PrimeQ[Range[310]],5,1],?(Union[#]=={False}&),{1},Heads->False]]+2 (* _Harvey P. Dale, Nov 01 2013 *)
-
PARI
for(n=4,1e4,if(n-precprime(n)>2&&nextprime(n)-n>2,print1(n",")))
Extensions
Comment and program from Charles R Greathouse IV, Nov 12 2009
Corrected terms, Clark Kimberling and Joerg Arndt, Jun 24 2011.
Comments