login
A143727
Near-prime numbers: numbers n such that n-2=prime, n+2=prime, n-4=prime, n+4=prime, n-8=prime, n+8=prime.
1
15, 105, 16065, 19425, 43785, 1091265, 1615845, 1954365, 2822715, 2839935, 3243345, 3400215, 6005895, 6503595, 7187775, 7641375, 8062005, 8741145, 10526565, 11086845, 11664555, 14520555, 14812875, 14834715, 14856765, 16025835, 16094715, 18916485, 19197255
OFFSET
1,1
LINKS
FORMULA
a(n) = 8 + A022008(n). - R. J. Mathar, Aug 31 2008
EXAMPLE
15 is in the sequence since 15-2=13, 15+2=17, 15-4=11, 15+4=19, 15-8=7, and 15+8=23 are all prime.
MATHEMATICA
lst={}; Do[If[PrimeQ[n-2]&&PrimeQ[n+2]&&PrimeQ[n-4]&&PrimeQ[n+4]&&PrimeQ[n-8]&&PrimeQ[n+8], AppendTo[lst, n]], {n, 5*10!}]; lst
Mean/@Select[Partition[Prime[Range[123*10^4]], 6, 1], Differences[#]=={4, 2, 4, 2, 4}&] (* Harvey P. Dale, Oct 09 2018 *)
PROG
(Magma) [n: n in [0..2*10^7] | IsPrime(n-2) and IsPrime(n+2) and IsPrime(n-4)and IsPrime(n+4) and IsPrime(n-8) and IsPrime(n+8)]; /* or */ [8+p: p in PrimesUpTo(2*10^7) | IsPrime(p+4) and IsPrime(p+6) and IsPrime(p+10)and IsPrime(p+12) and IsPrime(p+16)]; // Vincenzo Librandi, Dec 01 2015
(PARI) isok(n) = isprime(n-2) && isprime(n+2) && isprime(n-4) && isprime(n+4) && isprime(n-8) && isprime(n+8); \\ Michel Marcus, Dec 16 2015
CROSSREFS
Sequence in context: A349169 A077261 A012507 * A231327 A041426 A278781
KEYWORD
nonn,easy
AUTHOR
STATUS
approved