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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A334051 The difference between the number of prime numbers in the ranges (1, p_n] and (p_n, 2*p_n], where p_n is the n-th prime. 1
 0, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 3, 4, 5, 6, 5, 4, 6, 6, 6, 8, 7, 8, 8, 6, 6, 8, 9, 11, 12, 8, 9, 8, 9, 8, 10, 9, 10, 11, 12, 11, 12, 11, 12, 13, 14, 12, 10, 11, 12, 12, 13, 14, 13, 13, 13, 15, 16, 17, 18, 19, 18, 14, 14, 16, 17, 13, 14, 13, 15, 16, 17, 16, 16 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Table of n, a(n) for n=1..74. FORMULA a(n) = 2*n - pi(2*p_n). a(n) = 2*n - A020900(n). - Michel Marcus, Sep 11 2020 a(n) = 1 + A331677(n). - Alois P. Heinz, Oct 09 2020 EXAMPLE a(6) = 2*6 - pi(2*p_6) = 12 - pi(2*13) = 12 - pi(26) = 12 - 9 = 3. PROG (Python) from sympy import prime, primepi for n in range(1, 10001): a = 2*n - primepi(2*prime(n)) print(a) (PARI) a(n) = 2*n - primepi(2*prime(n)); \\ Michel Marcus, Sep 11 2020 CROSSREFS Cf. A000040, A000720, A020900, A331677. Sequence in context: A096036 A108504 A036468 * A345380 A367128 A028829 Adjacent sequences: A334048 A334049 A334050 * A334052 A334053 A334054 KEYWORD nonn AUTHOR Ya-Ping Lu, Sep 11 2020 STATUS approved

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.

Last modified March 4 12:21 EST 2024. Contains 370532 sequences. (Running on oeis4.)