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-10 of 43 results. Next

A161621 Numerator of (b(n+1) - b(n))/(b(n+2) - b(n)), where b(n) = A038107(n) is the number of primes up to n^2.

Original entry on oeis.org

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

Views

Author

Daniel Tisdale, Jun 14 2009

Keywords

Comments

If the limit of R(n) exists as n->oo it is 1/2, but existence of the limit is conjectural. R(n) generalizes to R_k(n) by substituting PrimePi_k for PrimePi(n), where PrimePi_k(n) is the number of numbers with k prime factors (including repetitions) <= n. Convergence of {R(n)} to 1/2 implies Legendre's conjecture. For discussion of the order of the number of prime factors of a number n see reference [1], below. The PNT and reference [1] suggest but offer no proof that R_k(n)-> 1/2 as n -> oo. The corresponding sequence for near-primes would be {R_2(n)} = {1/3, 2/3, 1/2, ...}.

Examples

			R(3) = (PrimePi(4^2)-PrimePi(3^2)) / (PrimePi(5^2)-PrimePi(3^2)) = (PrimePi(16)-PrimePi(9)) / (PrimePi(25)-PrimePi(9)) = (6-4)/(9-4) = 2/5. Hence a(3) = 2. - _Klaus Brockhaus_, Jun 15 2009
		

References

  • S. Ramanujan, The Normal Number of Prime Factors of a Number n, reprinted at Chapter 35, Collected Papers (Hardy et al., ed), AMS Chelsea Publishing, 2000.

Crossrefs

Cf. A161622 (denominators). - Klaus Brockhaus, Jun 15 2009

Programs

  • Magma
    [ Numerator((#PrimesUpTo((n+1)^2)-a) / (#PrimesUpTo((n+2)^2)-a)) where a is #PrimesUpTo(n^2): n in [1..85] ]; // Klaus Brockhaus, Jun 15 2009
  • Mathematica
    Numerator[(#[[2]]-#[[1]])/(#[[3]]-#[[1]])&/@Partition[PrimePi[ Range[ 90]^2],3,1]] (* Harvey P. Dale, Jan 06 2017 *)

Extensions

a(1) inserted and extended beyond a(13) by Klaus Brockhaus, Jun 15 2009
Simplified title by John W. Nicholson, Dec 13 2013

A000720 pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159...

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Partial sums of A010051 (characteristic function of primes). - Jeremy Gardiner, Aug 13 2002
pi(n) and prime(n) are inverse functions: a(A000040(n)) = n and A000040(n) is the least number m such that A000040(a(m)) = A000040(n). A000040(a(n)) = n if (and only if) n is prime. - Jonathan Sondow, Dec 27 2004
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
A lower bound that gets better with larger N is that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). - Ben Paul Thurston, Aug 23 2010
Number of partitions of 2n into exactly two parts with the smallest part prime. - Wesley Ivan Hurt, Jul 20 2013
Equivalent to the Riemann hypothesis: abs(a(n) - li(n)) < sqrt(n)*log(n)/(8*Pi), for n >= 2657, where li(n) is the logarithmic integral (Lowell Schoenfeld). - Ilya Gutkovskiy, Jul 05 2016
The second Hardy-Littlewood conjecture, that pi(x) + pi(y) >= pi(x + y) for integers x and y with min{x, y} >= 2, is known to hold for (x, y) sufficiently large (Udrescu 1975). - Peter Luschny, Jan 12 2021

Examples

			There are 3 primes <= 6, namely 2, 3 and 5, so pi(6) = 3.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; p. 129.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 5.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorems 6, 7, 420.
  • G. J. O. Jameson, The Prime Number Theorem, Camb. Univ. Press, 2003. [See also the review by D. M. Bressoud (link below).]
  • Władysław Narkiewicz, The Development of Prime Number Theory, Springer-Verlag, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 132-133, 157-184.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.1. (For inequalities, etc.).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Gerald Tenenbaum and Michel Mendès France, Prime Numbers and Their Distribution, AMS Providence RI, 1999.
  • V. Udrescu, Some remarks concerning the conjecture pi(x + y) <= pi(x) + pi(y), Rev. Roumaine Math. Pures Appl. 20 (1975), 1201-1208.

Crossrefs

Closely related:
A099802: Number of primes <= 2n.
A060715: Number of primes between n and 2n (exclusive).
A035250: Number of primes between n and 2n (inclusive).
A038107: Number of primes < n^2.
A014085: Number of primes between n^2 and (n+1)^2.
A007053: Number of primes <= 2^n.
A036378: Number of primes p between powers of 2, 2^n < p <= 2^(n+1).
A006880: Number of primes < 10^n.
A006879: Number of primes with n digits.
A033270: Number of odd primes <= n.
A065855: Number of composites <= n.
For lists of large values of a(n) see, e.g., A005669(n) = a(A002386(n)), A214935(n) = a(A205827(n)).
Related sequences:
Primes (p) and composites (c): A000040, A002808, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • Haskell
    a000720 n = a000720_list !! (n-1)
    a000720_list = scanl1 (+) a010051_list  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [ #PrimesUpTo(n): n in [1..200] ];  // Bruno Berselli, Jul 06 2011
    
  • Maple
    with(numtheory); A000720 := pi; [ seq(A000720(i),i=1..50) ];
  • Mathematica
    A000720[n_] := PrimePi[n]; Table[ A000720[n], {n, 1, 100} ]
    Array[ PrimePi[ # ]&, 100 ]
    Accumulate[Table[Boole[PrimeQ[n]],{n,100}]] (* Harvey P. Dale, Jan 17 2015 *)
  • PARI
    A000720=vector(100,n,omega(n!)) \\ For illustration only; better use A000720=primepi
    
  • PARI
    vector(300,j,primepi(j)) \\ Joerg Arndt, May 09 2008
    
  • Python
    from sympy import primepi
    for n in range(1,100): print(primepi(n), end=', ') # Stefano Spezia, Nov 30 2018
  • Sage
    [prime_pi(n) for n in range(1, 79)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

The prime number theorem gives the asymptotic expression a(n) ~ n/log(n).
For x > 1, pi(x) < (x / log x) * (1 + 3/(2 log x)). For x >= 59, pi(x) > (x / log x) * (1 + 1/(2 log x)). [Rosser and Schoenfeld]
For x >= 355991, pi(x) < (x / log(x)) * (1 + 1/log(x) + 2.51/(log(x))^2 ). For x >= 599, pi(x) > (x / log(x)) * (1 + 1/log(x)). [Dusart]
For x >= 55, x/(log(x) + 2) < pi(x) < x/(log(x) - 4). [Rosser]
For n > 1, A138194(n) <= a(n) <= A138195(n) (Tschebyscheff, 1850). - Reinhard Zumkeller, Mar 04 2008
For n >= 33, a(n) = 1 + Sum_{j=3..n} ((j-2)! - j*floor((j-2)!/j)) (Hardy and Wright); for n >= 1, a(n) = n - 1 + Sum_{j=2..n} (floor((2 - Sum_{i=1..j} (floor(j/i)-floor((j-1)/i)))/j)) (Ruiz and Sondow 2000). - Benoit Cloitre, Aug 31 2003
a(n) = A001221(A000142(n)). - Benoit Cloitre, Jun 03 2005
G.f.: Sum_{p prime} x^p/(1-x) = b(x)/(1-x), where b(x) is the g.f. for A010051. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = A036234(n) - 1. - Jaroslav Krizek, Mar 23 2009
From Enrique Pérez Herrero, Jul 12 2010: (Start)
a(n) = Sum_{i=2..n} floor((i+1)/A000203(i)).
a(n) = Sum_{i=2..n} floor(A000010(n)/(i-1)).
a(n) = Sum_{i=2..n} floor(2/A000005(n)). (End)
Let pf(n) denote the set of prime factors of an integer n. Then a(n) = card(pf(n!/floor(n/2)!)). - Peter Luschny, Mar 13 2011
a(n) = -Sum_{p <= n} mu(p). - Wesley Ivan Hurt, Jan 04 2013
a(n) = (1/2)*Sum_{p <= n} (mu(p)*d(p)*sigma(p)*phi(p)) + sum_{p <= n} p^2. - Wesley Ivan Hurt, Jan 04 2013
a(1) = 0 and then, for all k >= 1, repeat k A001223(k) times. - Jean-Christophe Hervé, Oct 29 2013
a(n) = n/(log(n) - 1 - Sum_{k=1..m} A233824(k)/log(n)^k + O(1/log(n)^{m+1})) for m > 0. - Jonathan Sondow, Dec 19 2013
a(n) = A001221(A003418(n)). - Eric Desbiaux, May 01 2014
a(n) = Sum_{j=2..n} H(-sin^2 (Pi*(Gamma(j)+1)/j)) where H(x) is the Heaviside step function, taking H(0)=1. - Keshav Raghavan, Jun 18 2016
a(A014076(n)) = (1/2) * (A014076(n) + 1) - n + 1. - Christopher Heiling, Mar 03 2017
From Steven Foster Clark, Sep 25 2018: (Start)
a(n) = Sum_{m=1..n} A143519(m) * floor(n/m).
a(n) = Sum_{m=1..n} A001221(m) * A002321(floor(n/m)) where A002321() is the Mertens function.
a(n) = Sum_{m=1..n} |A143519(m)| * A002819(floor(n/m)) where A002819() is the Liouville Lambda summatory function and |x| is the absolute value of x.
a(n) = Sum_{m=1..n} A137851(m)/m * H(floor(n/m)) where H(n) = Sum_{m=1..n} 1/m is the harmonic number function.
a(n) = Sum_{m=1..log_2(n)} A008683(m) * A025528(floor(n^(1/m))) where A008683() is the Moebius mu function and A025528() is the prime-power counting function.
(End)
Sum_{k=2..n} 1/a(k) ~ (1/2) * log(n)^2 + O(log(n)) (de Koninck and Ivić, 1980). - Amiram Eldar, Mar 08 2021
a(n) ~ 1/(n^(1/n)-1). - Thomas Ordowski, Jan 30 2023
a(n) = Sum_{j=2..n} floor(((j - 1)! + 1)/j - floor((j - 1)!/j)) [Mináč, unpublished] (see Ribenboim, pp. 132-133). - Stefano Spezia, Apr 13 2025
a(n) = n - 1 - Sum_{k=2..floor(log_2(n))} pi_k(n), where pi_k(n) is the number of k-almost primes <= n. - Daniel Suteu, Aug 27 2025

Extensions

Additional links contributed by Lekraj Beedassy, Dec 23 2003
Edited by M. F. Hasler, Apr 27 2018 and (links recovered) Dec 21 2018

A007504 Sum of the first n primes.

Original entry on oeis.org

0, 2, 5, 10, 17, 28, 41, 58, 77, 100, 129, 160, 197, 238, 281, 328, 381, 440, 501, 568, 639, 712, 791, 874, 963, 1060, 1161, 1264, 1371, 1480, 1593, 1720, 1851, 1988, 2127, 2276, 2427, 2584, 2747, 2914, 3087, 3266, 3447, 3638, 3831, 4028, 4227, 4438, 4661, 4888
Offset: 0

Views

Author

Keywords

Comments

It appears that a(n)^2 - a(n-1)^2 = A034960(n). - Gary Detlefs, Dec 20 2011
This is true. Proof: By definition we have A034960(n) = Sum_{k = (a(n-1)+1)..a(n)} (2*k-1). Since Sum_{k = 1..n} (2*k-1) = n^2, it follows A034960(n) = a(n)^2 - a(n-1)^2, for n > 1. - Hieronymus Fischer, Sep 27 2012 [formulas above adjusted to changed offset of A034960 - Hieronymus Fischer, Oct 14 2012]
Row sums of the triangle in A037126. - Reinhard Zumkeller, Oct 01 2012
Ramanujan noticed the apparent identity between the prime parts partition numbers A000607 and the expansion of Sum_{k >= 0} x^a(k)/((1-x)...(1-x^k)), cf. A046676. See A192541 for the difference between the two. - M. F. Hasler, Mar 05 2014
For n > 0: row 1 in A254858. - Reinhard Zumkeller, Feb 08 2015
a(n) is the smallest number that can be partitioned into n distinct primes. - Alonso del Arte, May 30 2017
For a(n) < m < a(n+1), n > 0, at least one m is a perfect square.
Proof: For n = 1, 2, ..., 6, the proposition is clear. For n > 6, a(n) < ((prime(n) - 1)/2)^2, set (k - 1)^2 <= a(n) < k^2 < ((prime(n) + 1)/2)^2, then k^2 < (k - 1)^2 + prime(n) <= a(n) + prime(n) = a(n+1), so m = k^2 is this perfect square. - Jinyuan Wang, Oct 04 2018
For n >= 5 we have a(n) < ((prime(n)+1)/2)^2. This can be shown by noting that ((prime(n)+1)/2)^2 - ((prime(n-1)+1)/2)^2 - prime(n) = (prime(n)+prime(n-1))*(prime(n)-prime(n-1)-2)/4 >= 0. - Jianing Song, Nov 13 2022
Washington gives an oscillation formula for |a(n) - pi(n^2)|, see links. - Charles R Greathouse IV, Dec 07 2022

References

  • E. Bach and J. Shallit, §2.7 in Algorithmic Number Theory, Vol. 1: Efficient Algorithms, MIT Press, Cambridge, MA, 1996.
  • H. L. Nelson, "Prime Sums", J. Rec. Math., 14 (1981), 205-206.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A122989 for the value of Sum_{n >= 1} 1/a(n).

Programs

  • GAP
    P:=Filtered([1..250],IsPrime);;
    a:=Concatenation([0],List([1..Length(P)],i->Sum([1..i],k->P[k]))); # Muniru A Asiru, Oct 07 2018
    
  • Haskell
    a007504 n = a007504_list !! n
    a007504_list = scanl (+) 0 a000040_list
    -- Reinhard Zumkeller, Oct 01 2014, Oct 03 2011
    
  • Magma
    [0] cat [&+[ NthPrime(k): k in [1..n]]: n in [1..50]]; // Bruno Berselli, Apr 11 2011 (adapted by Vincenzo Librandi, Nov 27 2015 after Hasler's change on Mar 05 2014)
    
  • Maple
    s1:=[2]; for n from 2 to 1000 do s1:=[op(s1),s1[n-1]+ithprime(n)]; od: s1;
    A007504 := proc(n)
        add(ithprime(i), i=1..n) ;
    end proc: # R. J. Mathar, Sep 20 2015
  • Mathematica
    Accumulate[Prime[Range[100]]] (* Zak Seidov, Apr 10 2011 *)
    primeRunSum = 0; Table[primeRunSum = primeRunSum + Prime[k], {k, 100}] (* Zak Seidov, Apr 16 2011 *)
  • PARI
    A007504(n) = sum(k=1,n,prime(k)) \\ Michael B. Porter, Feb 26 2010
    
  • PARI
    a(n) = vecsum(primes(n)); \\ Michel Marcus, Feb 06 2021
    
  • Python
    from itertools import accumulate, count, islice
    from sympy import prime
    def A007504_gen(): return accumulate(prime(n) if n > 0 else 0 for n in count(0))
    A007504_list = list(islice(A007504_gen(),20)) # Chai Wah Wu, Feb 23 2022

Formula

a(n) ~ n^2 * log(n) / 2. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 24 2001 (see Bach & Shallit 1996)
a(n) = A014284(n+1) - 1. - Jaroslav Krizek, Aug 19 2009
a(n+1) - a(n) = A000040(n+1). - Jaroslav Krizek, Aug 19 2009
a(A051838(n)) = A002110(A051838(n)) / A116536(n). - Reinhard Zumkeller, Oct 03 2011
a(n) = min(A068873(n), A073619(n)) for n > 1. - Jonathan Sondow, Jul 10 2012
a(n) = A033286(n) - A152535(n). - Omar E. Pol, Aug 09 2012
For n >= 3, a(n) >= (n-1)^2 * (log(n-1) - 1/2)/2 and a(n) <= n*(n+1)*(log(n) + log(log(n))+ 1)/2. Thus a(n) = n^2 * log(n) / 2 + O(n^2*log(log(n))). It is more precise than in Fares's comment. - Vladimir Shevelev, Aug 01 2013
a(n) = (n^2/2)*(log n + log log n - 3/2 + (log log n - 3)/log n + (2 (log log n)^2 - 14 log log n + 27)/(4 log^2 n) + O((log log n/log n)^3)) [Sinha]. - Charles R Greathouse IV, Jun 11 2015
G.f: (x*b(x))/(1-x), where b(x) is the g.f. of A000040. - Mario C. Enriquez, Dec 10 2016
a(n) = A008472(A002110(n)), for n > 0. - Michel Marcus, Jul 16 2020

Extensions

More terms from Stefan Steinerberger, Apr 11 2006
a(0) = 0 prepended by M. F. Hasler, Mar 05 2014

A014085 Number of primes between n^2 and (n+1)^2.

Original entry on oeis.org

0, 2, 2, 2, 3, 2, 4, 3, 4, 3, 5, 4, 5, 5, 4, 6, 7, 5, 6, 6, 7, 7, 7, 6, 9, 8, 7, 8, 9, 8, 8, 10, 9, 10, 9, 10, 9, 9, 12, 11, 12, 11, 9, 12, 11, 13, 10, 13, 15, 10, 11, 15, 16, 12, 13, 11, 12, 17, 13, 16, 16, 13, 17, 15, 14, 16, 15, 15, 17, 13, 21, 15, 15, 17, 17, 18, 22, 14, 18, 23, 13
Offset: 0

Views

Author

Jon Wild, Jul 14 1997

Keywords

Comments

Suggested by Legendre's conjecture (still open) that for n > 0 there is always a prime between n^2 and (n+1)^2.
a(n) is the number of occurrences of n in A000006. - Philippe Deléham, Dec 17 2003
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
Legendre's conjecture may be written pi((n+1)^2) - pi(n^2) > 0 for all positive n, where pi(n) = A000720(n), [the prime counting function]. - Jonathan Vos Post, Jul 30 2008 [Comment corrected by Jonathan Sondow, Aug 15 2008]
Legendre's conjecture can be generalized as follows: for all integers n > 0 and all real numbers k > K, there is a prime in the range n^k to (n+1)^k. The constant K is conjectured to be log(127)/log(16). See A143935. - T. D. Noe, Sep 05 2008
For n > 0: number of occurrences of n^2 in A145445. - Reinhard Zumkeller, Jul 25 2014

Examples

			a(17) = 5 because between 17^2 and 18^2, i.e., 289 and 324, there are 5 primes (which are 293, 307, 311, 313, 317).
		

References

  • J. R. Goldman, The Queen of Mathematics, 1998, p. 82.

Crossrefs

First differences of A038107.
Counts of primes between consecutive higher powers: A060199, A061235, A062517.

Programs

  • Haskell
    a014085 n = sum $ map a010051 [n^2..(n+1)^2]
    -- Reinhard Zumkeller, Mar 18 2012
    
  • Mathematica
    Table[PrimePi[(n + 1)^2] - PrimePi[n^2], {n, 0, 80}] (* Lei Zhou, Dec 01 2005 *)
    Differences[PrimePi[Range[0,90]^2]] (* Harvey P. Dale, Nov 25 2015 *)
  • PARI
    a(n)=primepi((n+1)^2)-primepi(n^2) \\ Charles R Greathouse IV, Jun 15 2011
    
  • Python
    from sympy import primepi
    def a(n): return primepi((n+1)**2) - primepi(n**2)
    print([a(n) for n in range(81)]) # Michael S. Branicky, Jul 05 2021

Formula

a(n) = A000720((n+1)^2) - A000720(n^2). - Jonathan Vos Post, Jul 30 2008
a(n) = Sum_{k = n^2..(n+1)^2} A010051(k). - Reinhard Zumkeller, Mar 18 2012
Conjecture: for all n>1, abs(a(n)-(n/log(n))) < sqrt(n). - Alain Rocchelli, Sep 20 2023
Up to n=10^6 there are no counterexamples to this conjecture. - Hugo Pfoertner, Dec 16 2024
Sorenson & Webster show that a(n) > 0 for all 0 < n < 7.05 * 10^13. - Charles R Greathouse IV, Jan 31 2025

A262408 Positive integers m such that pi(m^2) = pi(j^2) + pi(k^2) for no 0 < j <= k < m.

Original entry on oeis.org

1, 2, 5, 10, 21, 23, 46, 103, 105, 193, 222, 232, 285, 309, 345, 392, 404, 476, 587, 670, 779, 912, 1086, 1162, 1249, 2508, 2592, 2852, 2964, 3362, 3673, 3895, 4218, 4732, 5452, 6417, 7667, 7759, 8430, 8796, 9606, 11096, 11953, 12014, 12125, 13956, 14474, 15018, 17854, 18861, 18879, 19307, 22843, 28106, 29423, 31576, 37182
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 21 2015

Keywords

Comments

Conjecture: (i) There are infinitely many positive integers m such that pi(m^2) = pi(x^2) + pi(y^2) for some 0 < x <= y < m. Also, the current sequence has infinitely many terms.
(ii) For every n = 4,5,... the equation pi(x^n) + pi(y^n) = pi(z^n) has no integral solution with 0 < x <= y < z.
It is interesting to compare this conjecture with Fermat's Last Theorem. See also A262409 for the equation pi(x^3) + pi(y^3) = pi(z^3).

Examples

			a(3) = 5 since pi(5^2) = 9 cannot be written as pi(j^2) + pi(k^2) with 0 < j <= k < 5. Note that pi(1^2) = 0, pi(2^2) = 2, pi(3^2) = 4 and pi(4^2) = 6 are all even.
		

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.

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimePi[n^2]
    T[n_]:=Table[f[k],{k,1,n}]
    n=0;Do[Do[If[MemberQ[T[m-1],f[m]-f[k]],Goto[aa]],{k,1,m-1}];n=n+1;Print[n," ",m];Label[aa];Continue,{m,1,32000}]

A061265 Number of squares between n-th prime and (n+1)st prime.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Amarnath Murthy, Apr 24 2001

Keywords

Comments

If n-th prime is a member of A053001 then a(n) is at least 1. If not, then a(n) = 0.
Legendre's conjecture (still open) that there is always a prime between n^2 and (n+1)^2 is equivalent to conjecturing that a(n) <= 1 for all n. - Vladeta Jovovic, May 01 2003
a(A038107(n)) = 1 for n > 1; a(A221056(n)) = 0. - Reinhard Zumkeller, Apr 15 2013

Examples

			a(3) = 0 as there is no square between 5, the third prime and 7, the fourth prime. a(4) = 1, as there is a square (9) between the 4th prime 7 and the 5th prime 11.
		

Crossrefs

Cf. A053001.
Cf. A038107.
Cf. A014085.

Programs

Formula

a(n) = floor(sqrt(prime(n+1))) - floor(sqrt(prime(n))). - Vladeta Jovovic, May 01 2003

Extensions

Extended by Patrick De Geest, Jun 05 2001
Offset changed from 0 to 1 by Harry J. Smith, Jul 20 2009

A111208 Number of primes <= n-th triangular number.

Original entry on oeis.org

0, 0, 2, 3, 4, 6, 8, 9, 11, 14, 16, 18, 21, 24, 27, 30, 32, 36, 39, 42, 46, 50, 54, 58, 62, 66, 70, 74, 79, 84, 90, 94, 99, 102, 108, 114, 121, 126, 131, 137, 141, 149, 154, 160, 166, 174, 180, 188, 193, 200, 205, 216, 220, 226, 235, 242, 250, 259, 267, 274, 281, 290
Offset: 0

Views

Author

Giovanni Teofilatto, Oct 25 2005

Keywords

Comments

Only because of the case n = 2 is it necessary to say "<=", otherwise "<" would suffice. Except for the first two terms, there are no consecutive identical terms for n < 10000. A065382 gives differences between consecutive terms of this sequence. - Alonso del Arte, Oct 31 2005

Crossrefs

Programs

  • Haskell
    a111208 n = length $ takeWhile (<= a000217 n) a000040_list
    -- Reinhard Zumkeller, Nov 01 2011
  • Mathematica
    Table[PrimePi[n*(n + 1)/2], {n, 0, 60}] (* Ray Chandler, Oct 31 2005 *)
  • PARI
    { allocatemem(932245000); default(primelimit, 4294965247); write("b111208.txt", 0, " ", 0); for (n = 1, 10000, t=n*(n + 1)/2; a=primepi(t); write("b111208.txt", n, " ", a); ) } \\ Harry J. Smith, Mar 10 2009
    
  • Sage
    [prime_pi(binomial(n,2)) for n in range(1, 63)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = A000720(A000217(n)).

Extensions

Extended by Ray Chandler and Alonso del Arte, Oct 31 2005

A262443 Positive integers m such that pi(m^2) = pi(j^2)*pi(k^2) for some 0 < j < k < m, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

8, 11, 14, 19, 20, 36, 38, 45, 66, 87, 91, 115, 139, 143, 152, 155, 201, 220, 227, 279, 357, 383, 391, 415, 418, 452, 476, 480, 489, 496, 500, 514, 521, 524, 549, 552, 557, 588, 595, 632, 653, 676, 706, 708, 749, 753, 761, 766, 820, 846, 863, 877, 922, 1009, 1038, 1041, 1044, 1052, 1057, 1080
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 23 2015

Keywords

Comments

Conjecture: (i) The sequence has infinitely many terms. Also, there are infinitely many positive integers m such that pi(m^2) = pi(j^2)*pi(k^2) for no 0 < j <= k < m.
(ii) For any integer n > 2, the equation pi(x^n)*pi(y^n) = pi(z^n) has no solution with 0 < x <= y < z.

Examples

			 a(1) = 8 since pi(8^2) = pi(64) = 18 = 2*9 = pi(2^2)*pi(5^2) with 0 < 2 < 5 < 8.
a(4) = 19 since pi(19^2) = pi(361) = 72 = 4*18 = pi(3^2)*pi(8^2) with 0 < 3 < 8 < 19.
		

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.

Crossrefs

Programs

  • Mathematica
    f[n_]:=PrimePi[n^2]
    T[n_]:=Table[f[k],{k,1,n}]
    Dv[n_]:=Divisors[f[n]]
    Le[n_]:=Length[Dv[n]]
    n=0;Do[Do[If[MemberQ[T[m],Part[Dv[m],i]]&&MemberQ[T[m],Part[Dv[m],Le[m]-i+1]],n=n+1;Print[n," ",m];Goto[aa]],{i,2,(Le[m]-1)/2}];Label[aa];Continue,{m,1,1080}]

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

A083415 Triangle read by rows: T(n,k) is defined as follows. Write the numbers from 1 to n^2 consecutively in n rows of length n; T(n,k) = number of primes in k-th row.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, following a suggestion of Wouter Meeussen, Jun 10 2003

Keywords

Comments

Sum(T(n,k): 1<=k<=n) = A038107(n); T(n,1)=A000720(n); T(n,2)=A060715(n) for n>1. - Reinhard Zumkeller, Jan 07 2004

Examples

			{0}
{1, 1}
{2, 1, 1} from / 1 2 3 / 4 5 6 / 7 8 9 /
{2, 2, 1, 1}
{3, 1, 2, 2, 1}
{3, 2, 2, 2, 1, 1}
		

References

  • Paulo Ribenboim, "The Little Book Of Big Primes," Springer-Verlag, NY 1991, page 185.

Crossrefs

Programs

  • Haskell
    a083415 n k = a083415_row n !! (k-1)
    a083415_row n = f n a010051_list where
       f 0 _     = []
       f k chips = (sum chin) : f (k - 1) chips' where
         (chin,chips') = splitAt n chips
    a083415_tabl = map a083415_row [1..]
    -- Reinhard Zumkeller, Jun 10 2012
  • Mathematica
    Table[PrimePi[m n]-PrimePi[(m-1) n], {n, 17}, {m, n}]
Showing 1-10 of 43 results. Next