login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240710 Primes p such that at least one number among p+-6 and p+-12 is also a prime. 3

%I

%S 5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,

%T 101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,

%U 191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,541,547,557,563

%N Primes p such that at least one number among p+-6 and p+-12 is also a prime.

%C The first difference between a(n) and A000040(n+2) is a(97) = 541, while A000040(99) = prime(99) = 523.

%C The union of A240709 and A240710 is the set of all prime numbers, i.e., A000040.

%H Lei Zhou, <a href="/A240710/b240710.txt">Table of n, a(n) for n = 1..10000</a>

%e For 2, 2+-6 and 2+-12 are all even composite numbers. So 2 is excluded.

%e For 3, 3+-6 and 3+-12 are all multiples of 3. So 3 is excluded.

%e For each prime number p between 5 and 521, at least one number among p+-6 and p+-12 is a prime number, thus p is included.

%e For 523, 523 - 12 = 511 = 7*73, 523 - 6 = 517 = 11*47, 523 + 6 = 529 = 23^2, 523 + 12 = 535 = 5*107. They are all composites, so 523 is excluded.

%t p = 1; Table[While[p = NextPrime[p]; ok = 0; a1 = p - 12; a2 = p - 6; a3 = p + 6; a4 = p + 12; If[a1 > 0, If[PrimeQ[a1], ok = 1]]; If[a2 > 0, If[PrimeQ[a2], ok = 1]]; If[PrimeQ[a3], ok = 1]; If[PrimeQ[a4], ok = 1]; ok == 0]; p, {n, 100}]

%Y Cf. A000040, A240709.

%K nonn,easy

%O 1,1

%A _Lei Zhou_, Apr 10 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 21 23:21 EST 2020. Contains 332113 sequences. (Running on oeis4.)