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.

A221205 a(n) is the nearest integer to sqrt(pi(10^n)) (see A006880).

Original entry on oeis.org

0, 2, 5, 13, 35, 98, 280, 815, 2400, 7131, 21332, 64172, 193928, 588273, 1790235, 5463018, 16710426, 51220671, 157289397, 483795067, 1490241458, 4596440959, 14193917243, 43878472986, 135777758736, 420530985064, 1303551591182, 4043817556078, 12553456467283, 38996129419652
Offset: 0

Views

Author

Vladimir Pletser, Jan 04 2013

Keywords

Comments

Nearest integer to sqrt(pi(10^n)) where pi(10^n) is the number of primes < 10^n (A006880).

Crossrefs

Cf. A006880.

Programs

  • Mathematica
    Array[Round@ Sqrt@ PrimePi[10^#] &, 17, 0] (* Michael De Vlieger, Mar 19 2021 *)
  • PARI
    a(n) = round(sqrt(primepi(10^n))); \\ Michel Marcus, Mar 19 2021
    
  • Python
    from math import isqrt
    from sympy import primepi
    def A221205(n): return (m:=isqrt(k:=int(primepi(10**n))))+int(k-m*(m+1)>=1) # Chai Wah Wu, Jul 31 2022

Formula

a(n) = round(sqrt(A006880(n))).

Extensions

a(21) to a(24) added by Vladimir Pletser, Feb 27 2013 (recovered by Georg Fischer, Jan 20 2019)
a(25)-a(28), obtained using A006880, added by Eduard Roure Perdices, Apr 16 2021
a(29), obtained using A006880, added by Chai Wah Wu, Jul 31 2022