|
|
A230772
|
|
Number of primes in the half-open interval [n, 3*n/2).
|
|
1
|
|
|
0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 3, 3, 3, 4, 5, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 5, 6, 5, 5, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 6, 6, 7, 7, 7, 7, 7, 7, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 7, 8, 8, 8, 9, 9, 8, 8, 9, 10, 10, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
Suggested by Bertrand's postulate (actually a theorem): for all x > 1, there is a prime number between x and 2x (see related references and links mentioned in A060715, A166968 and A143227).
For all n > 1, a(n)>=1 (that is, there is always a prime between n and 3*n/2); this can be seen using the stronger result proved by Jitsuro Nagura in 1952: for n >= 25, there is always a prime between n and (1 + 1/5)n.
Successive terms vary by no more than +/- one unit.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = sum(A010051(n+k): 0<=k<3*n/2).
|
|
EXAMPLE
|
a(29)=5 since five primes (29,31,37,41,43) are located between 29 and 43.5.
|
|
MATHEMATICA
|
a[n_]:=PrimePi[Ceiling[1.5*n]-1]-PrimePi[n-1]; Table[a[n], {n, 2, 100}]
|
|
PROG
|
(R)
nvalues <- 1000
A <- vector('numeric', nvalues)
A[1] <- 0
# primepi = table of the primepi sequence A000720
for(i in 2:nvalues) A[i] <- primepi[ceiling(1.5*i)-1]-primepi[i-1]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|