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.

A020900 Greatest k such that k-th prime < twice n-th prime.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 11, 12, 14, 16, 18, 21, 22, 23, 24, 27, 30, 30, 32, 34, 34, 37, 38, 40, 44, 46, 46, 47, 47, 48, 54, 55, 58, 59, 62, 62, 65, 66, 67, 68, 71, 72, 75, 76, 77, 78, 82, 86, 87, 88, 90, 91, 92, 95, 97, 99, 99, 100, 101, 102, 103, 106, 112
Offset: 1

Views

Author

Keywords

Examples

			4th prime is 7, twice the 4th prime is 14, the greatest prime < 14 is 13 that is the 6th prime, hence, a(4) = 6. - _Bernard Schott_, Feb 02 2020
		

Crossrefs

Cf. A000720 (pi(n)), A100484 (2*prime(n)).
Cf. A102820 (first differences).

Programs

  • Mathematica
    PrimePi[NextPrime[#,-1]]&/@(2Prime[Range[70]]) (* Harvey P. Dale, Jul 05 2012 *)
  • PARI
    a(n) = primepi(2*prime(n)); \\ Michel Marcus, Oct 25 2017; Feb 02 2020

Formula

a(n) = A000720(A100484(n)). - Michel Marcus, Feb 02 2020