The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A332086 a(n) = pi(prime(n) + n) - n, where pi is the prime counting function. 6

%I #27 Sep 11 2020 11:24:40

%S 1,1,1,1,1,2,2,1,2,2,2,3,3,2,3,3,4,4,4,4,3,4,4,6,5,5,4,4,4,4,6,6,6,6,

%T 7,6,7,8,7,7,6,6,8,7,8,7,8,10,9,9,10,9,9,8,9,10,9,8,8,8,7,9,10,10,9,

%U 10,11,11,11,11,11,11,12,12,12,12,13,13,13,13

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

%C This sequence is related to a theorem of Lu and Deng (see LINKS): “The prime gap of a prime number is less than or equal to the prime count of the prime number”, which is equivalent to “There exists at least one prime number between p and p+pi(p)+1”, or pi(p+pi(p)) - pi(p) > 1, where pi is prime counting function. The n-th term of the sequence, a(n), is the number of prime number between the n-th prime number p_n and p_n + pi(p_n) + 1. According to the theorem, a(n) >= 1.

%H Robert Israel, <a href="/A332086/b332086.txt">Table of n, a(n) for n = 1..10000</a>

%H Ya-Ping Lu and Shu-Fang Deng, <a href="https://arxiv.org/abs/2007.15282">An upper bound for the prime gap</a>, arXiv:2007.15282 [math.GM], 2020.

%F a(n) = pi(prime(n) + n) - n.

%F a(n) = A000720(A014688(n)) - n. - _Michel Marcus_, Aug 23 2020

%e a(1) = pi(p_1 + 1) - 1 = pi(2 + 1) - 1 = 2 - 1 = 1;

%e a(2) = pi(p_2 + 2) - 2 = pi(3 + 2) - 2 = 3 - 2 = 1;

%e a(6) = pi(p_6 + 6) - 6 = pi(13 + 6) - 6 = 8 - 6 = 2;

%e a(80) = pi(p_80 + 80) - 80 = pi(409 + 80) - 80 = 93 - 80 = 13.

%p f:= n -> numtheory:-pi(ithprime(n)+n)-n:

%p map(f, [$1..100]); # _Robert Israel_, Sep 08 2020

%t a[n_] := PrimePi[Prime[n] + n] - n; Array[a, 100] (* _Amiram Eldar_, Aug 23 2020 *)

%o (Python)

%o from sympy import prime, primepi

%o for n in range(1, 1001):

%o a = primepi(prime(n) + n) - n

%o print(a)

%o (PARI) a(n) = primepi(prime(n) + n) - n; \\ _Michel Marcus_, Aug 23 2020

%Y Cf. A000720 (pi), A014688 (prime(n)+n).

%K nonn

%O 1,6

%A _Ya-Ping Lu_, Aug 22 2020

%E Name edited by _Michel Marcus_, Sep 02 2020

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 May 21 14:18 EDT 2024. Contains 372738 sequences. (Running on oeis4.)