[go: up one dir, main page]

login
A229989
Number of primes in the interval [floor(n/2), floor(3n/2)].
2
0, 2, 2, 3, 4, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7, 7, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 13, 14, 14, 14, 15, 16, 16, 16, 17, 18, 18, 18
OFFSET
1,2
COMMENTS
Conjectures:
(1) a(n+1) - a(n) = 1 for infinitely many n;
(2) a(n+1) - a(n) = -1 for infinitely many n;
(3) a(n+1) - a(n) = -1 if and only if n = 2*prime(m+1) - 1.
LINKS
EXAMPLE
a(5) = 4 counts the primes in the interval [2,7].
MAPLE
with(numtheory): A229989 := proc(n) return pi(floor((3/2)*n))-pi(floor(n/2)-1): end proc: seq(A229989(n), n=1..75); # Nathaniel Johnston, Oct 11 2013
MATHEMATICA
z = 1000; c[n_] := PrimePi[Floor[3 n/2]] - PrimePi[Floor[n/2]-1];
t = Table[c[n], {n, 1, z}]; (* A229989 *)
Flatten[Position[Differences[t], -1]] (* A076274? *)
Flatten[Position[Differences[t], 1]] (* A229990 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 09 2013
STATUS
approved