The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A251482 a(n) = floor(prime(n)/log(n)) + ceiling(prime(n)/log(prime(n))) - 2*n, n >=2. 1
 3, 2, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, -1, 0, -1, 0, 2, 0, 0, -1, -2, -3, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, -1, 1, 0, -1, -3, 0, 3, 2, 1, 0, 0, -2, 0, 1, 1, 1, -1, -1, -2, -3, -2, 2, 1, -1, -1, 2, 1, 3, 2, 1, 1, 2, 1, 1, 1, 1, 2, 0, 2, 3, 1, 3, 1, 1, 0, 0, 1, 0, -2, -3, -1, 0, 0, 0, -1, -1, 1, -1, 3 (list; graph; refs; listen; history; text; internal format)
 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 FORMULA a(n) = A085581(n) + (A086861(n) + 1) - 2*n. 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. A086861 (floor(prime(n)/log(prime(n)))), A085581 (floor(prime(n)/log(n)). Cf. A087724 (-PrimePi(n) + floor(prime(n)/log(n)) - 2), A000720 (pi(n)). Cf. A060715 (Number of primes between n and 2n exclusive). Sequence in context: A138384 A129172 A318291 * A172083 A337199 A090189 Adjacent sequences:  A251479 A251480 A251481 * A251483 A251484 A251485 KEYWORD sign,easy AUTHOR Freimut Marschner, Dec 07 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 13 11:56 EDT 2021. Contains 342936 sequences. (Running on oeis4.)