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.

Showing 1-4 of 4 results.

A038107 Number of primes < n^2.

Original entry on oeis.org

0, 0, 2, 4, 6, 9, 11, 15, 18, 22, 25, 30, 34, 39, 44, 48, 54, 61, 66, 72, 78, 85, 92, 99, 105, 114, 122, 129, 137, 146, 154, 162, 172, 181, 191, 200, 210, 219, 228, 240, 251, 263, 274, 283, 295, 306, 319, 329, 342, 357, 367, 378, 393, 409, 421, 434, 445, 457, 474
Offset: 0

Views

Author

Joe K. Crump (joecr(AT)carolina.rr.com)

Keywords

Comments

Also number of primes <= n^2 since n^2 is not prime.
Also the number of primes contained within an n X n square spiral. - William A. Tedeschi, Mar 03 2008
For large n, these numbers closely approximate the sum of primes less than n. For example, n = 10^10, sum of primes < n = 2220822432581729238. The number of primes < (10^10)^2 = 10^20 = 2220819602560918840. The error is 0.0000012743... The derivation of this is in the link Sum of Primes. - Cino Hilliard, Jun 09 2008
a(n) - A000720(n) = A073882(n) - A010051(n) = A117490(n). - Reinhard Zumkeller, May 20 2010
A061265(a(n)) = 1 for n > 1. - Reinhard Zumkeller, Apr 15 2013
From Zhi-Wei Sun, Feb 17 2014: (Start)
Conjecture:
(i) The sequence a(n)^(1/n) (n = 3, 4, ...) is strictly decreasing (to the limit 1).
(ii) If n > 0 is not among 25, 35, 44, 46, 105, then the interval [a(n), a(n+1)] contains at least one prime. (End)
A classical conjecture of Legendre asserts that a(n) < a(n+1) for all n > 0.
Conjecture: All the numbers Sum_{i=j,...,k} 1/a(i) with 1 < j <= k have pairwise distinct fractional parts. - Zhi-Wei Sun, Sep 24 2015

Examples

			a(2)=2 because the only primes < 4 are 2 and 3.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187. (See Conjectures 2.14-2.16.)

Crossrefs

Cf. A014085 (first differences), A111208, A194189, A262408, A262443, A262447, A262462.

Programs

  • Haskell
    a038107 0 = 0
    a038107 n = a000720 $ a000290 n
    -- Reinhard Zumkeller, Apr 15 2013, Nov 01 2011
    
  • Maple
    A038107 := proc(n) numtheory[pi]( n^2) ; end: seq(A038107(n),n=0..100) ; # R. J. Mathar, Jun 22 2009
  • Mathematica
    Table[PrimePi[n^2], {n, 0, 100}] (* Ray Chandler, Oct 22 2005 *)
  • PARI
    a(n)=primepi(n^2) \\ Charles R Greathouse IV, Apr 26 2012
  • Sage
    [prime_pi(n^2) for n in range(0, 59)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = A000720(A000290(n)).
a(n) ~ 1/2 * n^2/log n. - Charles R Greathouse IV, Apr 26 2012

Extensions

Extended by Ray Chandler, Oct 22 2005

A073882 Number of primes between n and n^2.

Original entry on oeis.org

0, 2, 3, 4, 7, 8, 12, 14, 18, 21, 26, 29, 34, 38, 42, 48, 55, 59, 65, 70, 77, 84, 91, 96, 105, 113, 120, 128, 137, 144, 152, 161, 170, 180, 189, 199, 208, 216, 228, 239, 251, 261, 270, 281, 292, 305, 315, 327, 342, 352, 363, 378, 394, 405, 418, 429, 441, 458, 471
Offset: 1

Views

Author

Amarnath Murthy, Aug 16 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Table[c=PrimePi[n^2]-PrimePi[n];If[PrimeQ[n],c+1,c],{n,59}] (* James C. McMahon, Jan 12 2025 *)
  • PARI
    a(n)=sum(k=n,n^2,isprime(k))

Formula

a(n) = A038107(n) - A000720(n) + A010051(n). - Reinhard Zumkeller, May 20 2010
a(n) = Sum_{k=n..n^2} A010051(k) = A117490(n) + A010051(n). - Reinhard Zumkeller, May 20 2010

Extensions

Corrected and extended by Benoit Cloitre, Aug 20 2002

A117491 The number of primes between n and n^3 (with n and n^3 excluded).

Original entry on oeis.org

0, 3, 7, 16, 27, 44, 64, 93, 125, 164, 212, 264, 321, 394, 470, 558, 649, 758, 874, 999, 1139, 1290, 1448, 1624, 1812, 2011, 2218, 2451, 2697, 2951, 3217, 3501, 3806, 4126, 4472, 4810, 5182, 5567, 5983, 6401, 6837, 7295, 7775, 8279, 8796, 9347, 9901, 10484
Offset: 1

Views

Author

Keywords

Examples

			For n = 3: between 3+1 = 4 and 3^3-1 = 26 there are the following primes: 5, 7, 11, 13, 17, 19, 23. Therefore the number of primes is 7.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,j,np; for i from 1 by 1 to n do np:=0; for j from i+1 by 1 to i^3-1 do if isprime(j) then np:=np+1; fi; od; print(np); od; end: P(100);
  • Mathematica
    Table[PrimePi[n^3]-PrimePi[n],{n,50}] (* Harvey P. Dale, Nov 08 2012 *)

A093874 Least k such that there are at least n primes between k and k^2.

Original entry on oeis.org

2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21
Offset: 1

Views

Author

Amarnath Murthy, Apr 20 2004

Keywords

Crossrefs

Cf. A117490.

Extensions

More terms from David Wasserman, Apr 23 2007
Showing 1-4 of 4 results.