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.

A060019 a(n) = floor(2*sqrt(prime(n)-2)) where prime(n) = n-th prime.

Original entry on oeis.org

0, 2, 3, 4, 6, 6, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 16, 16, 17, 18, 18, 19, 19, 20, 20, 20, 21, 22, 22, 23, 23, 24, 24, 24, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 29, 30, 30, 30, 30, 30, 31, 31, 32, 32, 32, 33, 33, 33, 34, 34, 35, 35, 35
Offset: 1

Views

Author

N. J. A. Sloane, Mar 17 2001

Keywords

Crossrefs

Cf. A060018.

Programs

  • PARI
    a(n) = floor(2*sqrt(prime(n)-2)); \\ Michel Marcus, Nov 26 2015
    
  • PARI
    a(n,p=prime(n))=sqrtint(4*p-8) \\ Charles R Greathouse IV, Jan 24 2018
    
  • Python
    from math import isqrt
    from sympy import prime
    def A060019(n): return isqrt(prime(n)-2<<2) # Chai Wah Wu, Jun 06 2025

Formula

For n=1, prime(1) is 2, and a(n) = 0.

Extensions

Offset set to 1 by Michel Marcus, Nov 26 2015