|
|
A060715
|
|
Number of primes between n and 2n exclusive.
|
|
46
|
|
|
0, 1, 1, 2, 1, 2, 2, 2, 3, 4, 3, 4, 3, 3, 4, 5, 4, 4, 4, 4, 5, 6, 5, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 9, 10, 9, 9, 10, 10, 9, 9, 10, 10, 11, 12, 11, 12, 13, 13, 14, 14, 13, 13, 12, 12, 12, 13, 13, 14, 13, 13, 14, 15, 14, 14, 13, 13, 14, 15, 15
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
The number of partitions of 2n+2 into exactly two parts where the first part is a prime strictly less than 2n+1. - Wesley Ivan Hurt, Aug 21 2013
|
|
REFERENCES
|
M. Aigner and C. M. Ziegler, Proofs from The Book, Chapter 2, Springer NY 2001.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(35)=8 since eight consecutive primes (37,41,43,47,53,59,61,67) are located between 35 and 70.
|
|
MAPLE
|
a := proc(n) local counter, i; counter := 0; from i from n+1 to 2*n-1 do if isprime(i) then counter := counter +1; fi; od; return counter; end:
with(numtheory); seq(pi(2*k-1)-pi(k), k=1..100); # Wesley Ivan Hurt, Aug 21 2013
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) { for (n=1, 1000, write("b060715.txt", n, " ", primepi(2*n - 1) - primepi(n)); ) } \\ Harry J. Smith, Jul 10 2009
(Haskell)
(Magma) [0] cat [#PrimesInInterval(n+1, 2*n-1): n in [2..80]]; // Bruno Berselli, Sep 05 2012
(Python) from sympy import primerange as pr
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected by Dug Eichelberger (dug(AT)mit.edu), Jun 04 2001
More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001
|
|
STATUS
|
approved
|
|
|
|