cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A087723 Values that appear more than once in A087724 (related to the growth of PrimePi).

Original entry on oeis.org

1, 2, 7, 11, 12, 13, 15, 19, 26, 29, 33, 35, 41, 48, 54, 71, 72, 76, 84, 86, 90, 92, 93, 96, 98, 103, 105, 108, 117, 122, 127, 129, 130, 137, 142, 152, 157, 158, 165, 176, 180, 183, 191, 193, 194, 196, 213, 214, 218, 219, 229, 231, 233, 234, 235, 246, 250, 256, 267
Offset: 1

Views

Author

Roger L. Bagula, Sep 29 2003

Keywords

Programs

  • Mathematica
    Digits=1000 a[n_]=-PrimePi[n]+Floor[Prime[n]/Log[n]]-2 b=Table[a[n], {n, 2, Digits}] c=Table[If[b[[n]]-b[[n-1]]==0, b[[n]], 0], {n, 2, Digits-1}] d=Delete[Union[c], 1]

A251482 a(n) = floor(prime(n)/log(n)) + ceiling(prime(n)/log(prime(n))) - 2*n, n >=2.

Original entry on oeis.org

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
Offset: 2

Views

Author

Freimut Marschner, Dec 07 2014

Keywords

Comments

The prime number theorem implies prime(n)/log(prime(n)) < n < prime(n)/log(n), n >= 2. From this follows a(n).

Examples

			a(4) = floor(5.04...) + ceiling(3.59...) - 2*4 = 5 + 4 - 2*4 = 1.
		

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).

Programs

  • Magma
    [Floor(NthPrime(n)/Log(n)) + Ceiling(NthPrime(n)/Log(NthPrime(n))) - 2*n: n in [2..100]]; // Vincenzo Librandi, Mar 25 2015
  • Mathematica
    a251482[n_Integer] :=
    Floor[Prime[#]/Log[#]] + Ceiling[Prime[#]/Log[Prime[#]]] - 2 # & /@
    Range[2, n]; a251482[100] (* Michael De Vlieger, Dec 15 2014 *)
  • 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
    

Formula

a(n) = A085581(n) + (A086861(n) + 1) - 2*n.
Showing 1-2 of 2 results.