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.

A079416 a(n) = round(prime(n)/n).

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2003

Keywords

Comments

The sequence is not monotone, see example and A079417.

Examples

			a(20) = round(prime(20)/20) = round(71/20) = round(3.55) = 4;
a(21) = round(prime(21)/21) = round(73/21) = round(3.476190...) = 3;
a(22) = round(prime(22)/22) = round(79/22) = round(3.590909...) = 4.
		

Crossrefs

Programs

  • Magma
    [Round(NthPrime(n)/n): n in [1..100]]; // G. C. Greubel, Jan 18 2019
    
  • Mathematica
    f[n_] := Round[ Prime[n]/n]; Array[f, 105] (* Robert G. Wilson v, Oct 23 2015 *)
  • PARI
    vector(100, n, round(prime(n)/n)) \\ G. C. Greubel, Jan 18 2019
    
  • Sage
    [round(nth_prime(n)/n) for n in (1..100)] # G. C. Greubel, Jan 18 2019