login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A168141 a(n) = pi(n + 1) - pi(n - 2), where pi is the prime counting function. 1

%I #26 May 18 2020 07:03:04

%S 1,2,2,2,1,2,1,1,0,1,1,2,1,1,0,1,1,2,1,1,0,1,1,1,0,0,0,1,1,2,1,1,0,0,

%T 0,1,1,1,0,1,1,2,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,2,1,1,0,0,0,1,1,1,

%U 0,1,1,2,1,1,0,0,0,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,1,1,2,1,1,0

%N a(n) = pi(n + 1) - pi(n - 2), where pi is the prime counting function.

%C Conjecture: a(n) = 2 for infinitely many n. This is equivalent to the twin prime conjecture. - _Andrew Slattery_, Apr 26 2020

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TwinPrimeConjecture.html">Twin Prime Conjecture</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Twin_prime#Other_theorems_weaker_than_the_twin_prime_conjecture">Twin prime</a>

%F From _Alois P. Heinz_, Apr 28 2020: (Start)

%F a(n) = 2 <=> n in { 2,3 } union { A014574 }.

%F a(n) = 0 <=> { A079364 }. (End)

%p A168141 := proc(n) numtheory[pi](n+1)-numtheory[pi](n-2) ; end proc: seq(A168141(n),n=1..120) ; # _R. J. Mathar_, Nov 19 2009

%p # second Maple program:

%p a:= n-> add(`if`(isprime(n+i), 1, 0), i=-1..1):

%p seq(a(n), n=1..120); # _Alois P. Heinz_, Apr 28 2020

%t Table[PrimePi[n + 1] - PrimePi[n - 2], {n, 100}] (* _Wesley Ivan Hurt_, Apr 26 2020 *)

%o (PARI) a(n) = primepi(n+1) - primepi(n-2); \\ _Michel Marcus_, Apr 27 2020

%Y Cf. A000720, A014574, A079364, A090406.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Nov 19 2009

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)