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.

A122121 Number of primes <= 10^(n/2).

This page as a plain text file.
%I A122121 #34 Oct 17 2024 15:53:58
%S A122121 0,2,4,11,25,65,168,446,1229,3401,9592,27293,78498,227647,664579,
%T A122121 1951957,5761455,17082666,50847534,151876932,455052511,1367199811,
%U A122121 4118054813,12431880460,37607912018,113983535775,346065536839,1052370166553,3204941750802,9773865306521
%N A122121 Number of primes <= 10^(n/2).
%H A122121 David Baugh, <a href="/A122121/b122121.txt">Table of n, a(n) for n = 0..52</a>
%F A122121 a(2n) = A006880(n). - _R. J. Mathar_, Jan 13 2007
%e A122121 a(3) = 11: sqrt(1000) = 31.62277660..., pi(31) = 11.
%t A122121 a={}; For[n=0, n<=27, n++, AppendTo[a,PrimePi[10^(n/2)]]]; Print[a]; (* _John W. Layman_, Mar 12 2010 *)
%o A122121 (PARI) { a= 0; n= 1; p=2 ; while(1, a++ ; pnext =nextprime(p+1) ; if( p^2 <= 10^n && pnext^2>10^n, print(a) ; n++ ; ) ; p=pnext ; ) ; } \\ _R. J. Mathar_, Jan 13 2007
%o A122121 (Python)
%o A122121 from math import isqrt
%o A122121 from sympy import primepi
%o A122121 def A122121(n): return primepi(isqrt(10**n)) # _Chai Wah Wu_, Oct 17 2024
%Y A122121 Cf. A000720, A006880.
%K A122121 nonn
%O A122121 0,2
%A A122121 _N. J. A. Sloane_, based on a suggestion from Klaus Kastberg (Kastberg(AT)aapt.net.au), Oct 17 2006
%E A122121 More terms from _R. J. Mathar_, Jan 13 2007
%E A122121 a(0)-a(17) confirmed, and a(18)-a(26) added using Mathematica, by _John W. Layman_, Mar 12 2010
%E A122121 a(27) and a(28) added using Mathematica, by _David Baugh_, Oct 06 2011
%E A122121 a(29) from _Donovan Johnson_, Mar 12 2013
%E A122121 a(30)-a(46) added using Kim Walisch's primecount program, by _David Baugh_, Feb 10 2015
%E A122121 a(47)-a(52) from _David Baugh_ using Kim Walisch's primecount program, Jun 19 2016