OFFSET
2,1
COMMENTS
The prime number theorem implies prime(n)/log(prime(n)) < n < prime(n)/log(n), n >= 2. From this follows a(n).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 2..10000
EXAMPLE
a(4) = floor(5.04...) + ceiling(3.59...) - 2*4 = 5 + 4 - 2*4 = 1.
MATHEMATICA
a251482[n_Integer] :=
Floor[Prime[#]/Log[#]] + Ceiling[Prime[#]/Log[Prime[#]]] - 2 # & /@
Range[2, n]; a251482[100] (* Michael De Vlieger, Dec 15 2014 *)
PROG
(PARI) vector(100, n, floor(prime(n+1)/log(n+1))+ceil(prime(n+1)/log(prime(n+1)))-2*n-2) \\ Derek Orr, Dec 30 2014
(Magma) [Floor(NthPrime(n)/Log(n)) + Ceiling(NthPrime(n)/Log(NthPrime(n))) - 2*n: n in [2..100]]; // Vincenzo Librandi, Mar 25 2015
CROSSREFS
Cf. A060715 (Number of primes between n and 2n exclusive).
KEYWORD
sign,easy,changed
AUTHOR
Freimut Marschner, Dec 07 2014
STATUS
approved