# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a000040 Showing 1-1 of 1 %I A000040 M0652 N0241 %S A000040 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89, %T A000040 97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179, %U A000040 181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271 %N A000040 The prime numbers. %C A000040 A number n is prime if it is greater than 1 and has no positive divisors except 1 and n. %C A000040 A natural number is prime if and only if it has exactly two (positive) divisors. %C A000040 A prime has exactly one proper positive divisor, 1. %C A000040 The sum of an odd number > 1 (2i+1, i >= 1) of consecutive positive odd numbers centered on the j-th odd number >= 2i+1 (2j+1, j >= i) being (2i+1)*(2j+1) has 2 or more odd prime factors (odd semiprime iff 2i+1 and 2j+1 are primes). - _Daniel Forgues_, Jul 15 2009 %C A000040 The paper by Kaoru Motose starts as follows: "Let q be a prime divisor of a Mersenne number 2^p-1 where p is prime. Then p is the order of 2 (mod q). Thus p is a divisor of q-1 and q>p. This shows that there exist infinitely many prime numbers." - Pieter Moree, Oct 14 2004 %C A000040 1 is not a prime, for if the primes included 1, then the factorization of a natural number n into a product of primes would not be unique, since n = n*1. %C A000040 1 is the empty product (has 0 prime factors) whereas a prime has 1 prime factor (itself). - Daniel Forgues, Jul 23 2009 %C A000040 Prime(n) and pi(n) are inverse functions: A000720(a(n)) = n and a(n) is the least number m such that a(A000720(m)) = a(n). a(A000720(n)) = n if (and only if) n is prime. %C A000040 Elementary primality test: If no prime =< sqrt(m) divides m, then m is prime (since a prime is its own exclusive multiple, apart from 1). - _Lekraj Beedassy_, Mar 31 2005 %C A000040 Second sequence ever computed by electronic computer, on EDSAC, May 9 1949 (see Renwick link). - _Russ Cox_, Apr 20 2006 %C A000040 Every prime p is a linear combination of previous primes p(n) with nonzero coefficients c(n) and |c(n)| < p(n). - Amarnath Murthy, Franklin T. Adams-Watters and Joshua Zucker, May 17 2006 %C A000040 Odd primes can only be written as a sum of two consecutive integers. Powers of 2 do not have a representation as a sum of k consecutive integers (other than the trivial n=n, for k=1). See A111774. - _Jaap Spies_, Jan 04 2007 %C A000040 There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + A001223(n). - _RĂ©mi Eismann_, Feb 16 2007 %C A000040 Equals row sums of triangle A143350. [_Gary W. Adamson_, Aug 10 2008] %C A000040 APSO (Alternating partial sums of sequence) a-b+c-d+e-f+g... = (a+b+c+d+e+f+g...)-2*(b+d+f...): APSO(A000040) = A008347=A007504 - 2*(A077126 repeated) (A007504-A008347)/2 = A077131 alternated with A077126. - _Eric Desbiaux_, Oct 28 2008 %C A000040 The Greek transliteration of 'Prime Number' is 'Proton Arithmon'. [_Daniel Forgues_, May 08 2009] %C A000040 It appears that, with the Bachet-Bezout theorem, A000040 = (2*A039701)+(3*A157966). - _Eric Desbiaux_, Nov 15 2009 %C A000040 a(n) = A008864(n) - 1 = A052147(n) - 2 = A113395(n) - 3 = A175221(n) - 4 = A175222(n) - 5 = A139049(n) - 6 = A175223(n) - 7 = A175224(n) - 8 = A140353(n) - 9 = A175225(n) - 10. [From _Jaroslav Krizek_, Mar 06 2010] %C A000040 2 and 3 might be referred to as the two "forcibly prime numbers" since there are no integers greater than 1 and less than or equal to their respective square roots. Not a single trial division ever needs to be done for 2 or 3, so they are disqualified from the get go from any attempt to belong to the set of composite numbers. 2 and 3 are thus the only consecutive primes. Since any further prime needs to be coprime to both 2 and 3, they can only be congruent to 5 or 1 (mod 2*3) and thus must all be of the form (2*3)*k -/+ 1 with k >= 1. When both (2*3)*k - 1 and (2*3)*k + 1 are prime for a given k >= 1, they are referred to as twin primes. (3 and 5 being the only twin primes of the form (2*2)*k - 1 and (2*2)*k + 1). - _Daniel Forgues_, Mar 19 2010 %C A000040 For prime n, the sum of divisors of n > product of divisors of n. Sigma(n)==1 (mod n). - _Juri-Stepan Gerasimov_, Mar 12 2011 %C A000040 Conjecture: a(n) = (6*f(n)+(-1)^f(n)-3)/2, n>2, where f(n) = floor(ithprime(n)/3)+1. See A181709. - _Gary Detlefs_, Dec 12 2011 %C A000040 Odd prime p divides some (2^k + 1) or (2^k - 1), (k>0, minimal, Cf. A003558) depending on the parity of A179480((p+1)/2) = r. This is a consequence of the Quasi-order theorem and corollaries, [Hilton and Pederson, pp. 260-264]: 2^k == (-1)^r mod b, b odd; and b divides 2^k - (-1)^r, where p is a subset of b. - _Gary W. Adamson_, Aug 26 2012 %C A000040 A number n is prime if and only if it is different from zero and different from a unit and each multiple of n decomposes into factors such that n divides at least one of the factors. This definition has the advantage that it does not make an assertion on the number of divisors of n. It applies equally for the integers (where a prime has exactly four divisors) and the natural numbers (where a prime has exactly two divisors). - _Peter Luschny_, Oct 09 2012 %C A000040 Motivated by his conjecture on representations of integers by alternating sums of consecutive primes, for any positive integer n, Zhi-Wei Sun conjectured that the polynomial P_n(x)= sum_{k=0}^n a(k+1)*x^k is irreducible over the field of rational numbers with the Galois group S_n, and moreover P_n(x) is irreducible mod a(m) for some m<=n(n+1)/2. It seems that no known criterion on irreduciblity of polynomials implies this conjecture. - _Zhi-Wei Sun_, Mar 23 2013 %D A000040 M. Agrawal, N. Kayal and N. Saxena, PRIMES is in P, Ann. of Math. (2) 160 (2004), no. 2, 781-793. %D A000040 M. Aigner and G. M. Ziegler, Proofs from The Book, Springer-Verlag, Berlin, 2nd. ed., 2001; see p. 3. %D A000040 T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2. %D A000040 E. Bach and __Jeffrey Shallit__, Algorithmic Number Theory, I, Chaps. 8, 9. %D A000040 P. T. Bateman and H. G. Diamond, A hundred years of prime numbers, Amer. Math. Monthly, Vol. 103 (1996) pp. 729-741. %D A000040 D. M. Bressoud, Factorization and Primality Testing, Springer-Verlag NY 1989. %D A000040 C. K. Caldwell and Y. Xiong, What is the smallest prime?, J. Integer Seq. 15 (2012), no. 9, Article 12.9.7, 14 pp., arXiv:1209.2007, 2012. - From _N. J. A. Sloane_, Dec 26 2012 %D A000040 M. Cipolla, "La determinazione asintotica dell'n-mo numero primo.", Rend. d. R. Acc. di sc. fis. e mat. di Napoli, s. 3, VIII (1902), pp. 132-166. %D A000040 R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 1. %D A000040 J.-P. Delahaye, Merveilleux nombres premiers, Pour la Science-Belin Paris, 2000. %D A000040 J.-P. Delahaye, Savoir si un nombre est premier: facile, Pour La Science, 303(1) 2003, pp. 98-102. %D A000040 M. Dietzfelbinger, Primality Testing in Polynomial Time, Springer NY 2004. %D A000040 U. Dudley, Formulas for primes, Math. Mag., 56 (1983), 17-22. %D A000040 Pierre Dusart, Autour de la fonction qui compte le nombre de nombres premiers, Dissertation, Universite de Limoges (1998). %D A000040 Pierre Dusart, The k-th prime is greater than k(ln k + ln ln k-1) for k>=2, Mathematics of Computation 68: (1999), 411-415. %D A000040 J. Elie, "L'algorithme AKS", in 'Quadrature', No. 60, pp. 22-32, 2006 EDP-sciences, Les Ulis (France); %D A000040 Seymour. B. Elk, "Prime Number Assignment to a Hexagonal Tessellation of a Plane That Generates Canonical Names for Peri-Condensed Polybenzenes", J. Chem. Inf. Comput. Sci., vol. 34 (1994), pp. 942-946. %D A000040 W. & F. Ellison, Prime Numbers, Hermann Paris 1985 %D A000040 T. Estermann, Introduction to Modern Prime Number Theory, Camb. Univ. Press, 1969. %D A000040 G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2. %D A000040 Peter Hilton and Jean Pedersen, A Mathematical Tapestry: Demonstrating the Beautiful Unity of Mathematics, Cambridge University Press, 2010, pp. (260-264). %D A000040 H. D. Huskey, Derrick Henry Lehmer [1905-1991]. IEEE Ann. Hist. Comput. 17 (1995), no. 2, 64-68. Math. Rev. 96b:01035 %D A000040 M. N. Huxley, The Distribution of Prime Numbers, Oxford Univ. Press, 1972. %D A000040 D. S. Jandu, Prime Numbers And Factorization, Infinite Bandwidth Publishing, N. Hollywood CA 2007. %D A000040 E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea, NY, 1974. %D A000040 D. H. Lehmer, The sieve problem for all-purpose computers. Math. Tables and Other Aids to Computation, Math. Tables and Other Aids to Computation, 7, (1953). 6-14. Math. Rev. 14:691e %D A000040 D. N. Lehmer, "List of Prime Numbers from 1 to 10,006,721", Carnegie Institute, Washington, D.C. 1909. %D A000040 W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, Chap. 6. %D A000040 H. Lifchitz, Table Des nombres Premiers de 0 a 20 millions (Tomes I & II), Albert Blanchard, Paris 1971. %D A000040 R. F. Lukes, C. D. Patterson and H. C. Williams, Numerical sieving devices: their history and some applications. Nieuw Arch. Wisk. (4) 13 (1995), no. 1, 113-139. Math. Rev. 96m:11082 %D A000040 Kaoru Motose, On values of cyclotomic polynomials. II, Math. J. Okayama Univ. 37 (1995), 27-36. %D A000040 P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1995. %D A000040 P. Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. %D A000040 H. Riesel, Prime Numbers and Computer Methods for Factorization, Birkhaeuser Boston, Cambridge MA 1994. %D A000040 B. Rittaud, "31415879. Ce nombre est-il premier?" ['Is this number prime?'], La Recherche, Vol. 361, pp. 70-73, Feb 15 2003, Paris. %D A000040 J. Barkley Rosser, Explicit Bounds for Some Functions of Prime Numbers, American Journal of Mathematics 63 (1941) 211-232. %D A000040 M. du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; see p. 5. %D A000040 D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, Chap. 1. %D A000040 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A000040 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A000040 D. Wells, Prime Numbers:The Most Mysterious Figures In Math, J.Wiley NY 2005. %D A000040 H. C. Williams and __Jeffrey Shallit__, Factoring integers before computers. Mathematics of Computation 1943-1993: a half-century of computational mathematics (Vancouver, BC, 1993), 481-531, Proc. Sympos. Appl. Math., 48, AMS, Providence, RI, 1994. Math. Rev. 95m:11143 %H A000040 N. J. A. Sloane, Table of n, prime(n) for n = 1..10000 %H A000040 N. J. A. Sloane, Table of n, prime(n) for n = 1..100000 %H A000040 M. Agrawal, N. Kayal & N. Saxena, PRIMES is in P, Annals of Maths., 160:2 (2004), pp. 781-793. [alternate link] %H A000040 M. Agrawal, A Short History of "PRIMES is in P" %H A000040 P. Alfeld, Notes and Literature on Prime Numbers %H A000040 Anonymous, Prime Number Master Index (for primes up to 2*10^7) %H A000040 Anonymous, prime number %H A000040 D. J. Bernstein, Proving Primality After Agrawal-Kayal-Saxena %H A000040 D. J. Bernstein, Distinguishing prime numbers from composite numbers %H A000040 P. Berrizbeitia, Sharpening "Primes is in P" for a large family of numbers %H A000040 A. Booker, The Nth Prime Page %H A000040 F. Bornemann, PRIMES Is in P:A Breakthrough for "Everyman" %H A000040 A. Bowyer, Formulae for Primes %H A000040 B. M. Bredikhin, Prime number %H A000040 R. P. Brent, Primality testing and integer factorization %H A000040 J. Britton, Prime Number List %H A000040 D. Butler, The first 2000 Prime Numbers %H A000040 C. K. Caldwell, The Prime Pages %H A000040 C. K. Caldwell, Tables of primes %H A000040 C. K. Caldwell, The first 10000 primes %H A000040 C. K. Caldwell, A Primality Test %H A000040 C. K. Caldwell and Y. Xiong, What is the smallest prime? %H A000040 M. Chamness, Prime number generator (Applet) %H A000040 P. Cox, Primes is in P %H A000040 P. J. Davis & R. Hersh, The Mathematical Experience, The Prime Number Theorem %H A000040 J.-M. De Koninck, Les nombres premiers: mysteres et consolation %H A000040 J.-M. De Koninck, Nombres premiers: mysteres et enjeux %H A000040 J.-P. Delahaye, Formules et nombres premiers %H A000040 J. Elie, L'algorithme AKS ou Les nombres premiers sont de classe P %H A000040 L. Euler, Observations on a theorem of Fermat and others on looking at prime numbers %H A000040 W. Fendt, Table of Primes from 1 to 1000000000000 %H A000040 P. Flajolet, S. Gerhold and B. Salvy, On the non-holonomic character of logarithms, powers and the n-th prime function %H A000040 J. Flamant, Primes up to one million %H A000040 K. Ford, Expositions of the PRIMES is in P theorem. %H A000040 L. & Y. Gallot, The Chronology of Prime Number Records %H A000040 P. Garrett, Big Primes, Factoring Big Integers %H A000040 P. Garrett, Naive Primality Test %H A000040 P. Garrett, Listing Primes %H A000040 N. Gast, PRIMES is in P: Manindra Agrawal, Neeraj Kayal and Nitin Saxena (in French) %H A000040 D. A. Goldston, S. W. Graham, J. Pintz and C. Y. Yildirim, Small gaps between primes and almost primes %H A000040 A. Granville, It is easy to determine whether a given integer is prime [alternate link] %H A000040 P. Hartmann, Prime number proofs (in German) %H A000040 ICON Project, List of first 50000 primes grouped within ten columns %H A000040 N. Kayal & N. Saxena, Resonance 11-2002, A polynomial time algorithm to test if a number is prime or not %H A000040 E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1 and vol. 2, Leipzig, Berlin, B. G. Teubner, 1909. %H A000040 W. Liang & H. Yan, Pseudo Random test of prime numbers %H A000040 J. Malkevitch, Primes %H A000040 Mathworld Headline News, Primality Testing is Easy %H A000040 K. Matthews, Generating prime numbers %H A000040 Y. Motohashi, Prime numbers-your gems %H A000040 J. Moyer, Some Prime Numbers %H A000040 C. W. Neville, New Results on Primes from an Old Proof of Euler's %H A000040 L. C. Noll, Prime numbers, Mersenne Primes, Perfect Numbers, etc. %H A000040 J. J. O'Connor & E. F. Robertson, Prime Numbers %H A000040 M. Ogihara & S. Radziszowski, Agrawal-Kayal-Saxena Algorithm for Testing Primality in Polynomial Time %H A000040 P. Papaphilippou, Plotter of prime numbers frequency graph (flash object) [From Philippos Papaphilippou (philippos(AT)safe-mail.net), Jun 02 2010] %H A000040 J. M. Parganin, Primes less than 50000 %H A000040 I. Peterson, Prime Pursuits %H A000040 O. E. Pol, Numeros primos %H A000040 O. E. Pol, Illustration of initial terms. %H A000040 Primefan, The First 500 Prime Numbers %H A000040 Primefan, Script to Calculate Prime Numbers %H A000040 Project Gutenberg Etext, First 100,000 Prime Numbers %H A000040 C. D. Pruitt, Formulae for Generating All Prime Numbers %H A000040 R. Ramachandran, Frontline 19 (17) 08-2000, A Prime Solution %H A000040 W. S. Renwick, EDSAC log. %H A000040 F. Richman, Generating primes by the sieve of Eratosthenes %H A000040 J. Barkley Rosser and Lowell Schoenfeld, Approximate formulas for some functions of prime numbers %H A000040 S. M. Ruiz and J. Sondow, Formulas for pi(n) and the n-th prime. %H A000040 S. O. S. Math, First 1000 Prime Numbers %H A000040 A. Schulman, Prime Number Calculator %H A000040 M. Slone, PlanetMath.Org, First thousand positive prime numbers %H A000040 A. Stiglic, The PRIMES is in P little FAQ %H A000040 Tomas Svoboda, List of primes up to 10^6 [Slow link] %H A000040 J. Teitelbaum, Review of "Prime numbers:A computational perspective" by R.Crandall & C.Pomerance %H A000040 J. Thonnard, Les nombres premiers(Primality check; Closest next prime; Factorizer) %H A000040 J. Tramu, Movie of primes scrolling %H A000040 A. Turpel, Aesthetics of the Prime Sequence %H A000040 G. Villemin's Almanac of Numbers, Primes up to 10000 %H A000040 S. Wagon, Prime Time: Review of "Prime Numbers:A Computational Perspective" by R. Crandall & C. Pomerance %H A000040 M. R. Watkins, unusual and physical methods for finding prime numbers %H A000040 S. Wedeniwski, Primality Tests on Commutator Curves %H A000040 E. Wegrzynowski, Les formules simples qui donnent des nombres premiers en grande quantites %H A000040 Eric Weisstein's World of Mathematics, Prime Number. %H A000040 Eric Weisstein's World of Mathematics, Prime Power %H A000040 Eric Weisstein's World of Mathematics, Almost Prime %H A000040 Eric Weisstein's World of Mathematics, Prime-Generating Polynomial %H A000040 Eric Weisstein's World of Mathematics, Prime Spiral %H A000040 Wikipedia, Prime number %H A000040 G. Xiao, Primes server, Sequential Batches Primes Listing (up to orders not exceeding 10^308) %H A000040 G. Xiao, Numerical Calculator, To display p(n) for n up to 41561, operate on "prime(n)" %H A000040 Zhi-Wei Sun, On functions taking only prime values, J. Number Theory 133(2013), no.8, 2794-2812. %H A000040 Index entries for "core" sequences %F A000040 The prime number theorem is the statement that a(n) ~ n * log n as n -> infinity (Hardy and Wright, page 10). %F A000040 For n >= 2, n*(log n + log log n - 3/2) < a(n); for n >= 20, a(n) < n*(log n + log log n - 1/2). [Rosser and Schoenfeld] %F A000040 For all n, a(n) > n log n. [Rosser] %F A000040 n log(n) + n (log log n - 1) < a(n) < n log n + n log log n for n >= 6 [Dusart, quoted in the Wikipedia article] %F A000040 a(n) = n log n + n log log n + (n/log n)*(log log n - log 2 - 2) + O( n (log log n)^2/ (log n)^2). [Cipoli, quoted in the Wikipedia article] %F A000040 a(n) = 2 + sum_{k=2..floor(2n*log(n)+2)} (1-floor(pi(k)/n)), for n>1, where the formula for pi(k) is given in A000720 (Ruiz and Sondow 2002) - _Jonathan Sondow_, Mar 06 2004 %F A000040 I conjecture that Sum(1/(p(i)*log(p(i)))=Pi/2=1.570796327... Sum(1/(i=1..100000 p(i)*log(p(i)))=1.565585514... It converges very slowly. - _Miklos Kristof_, Feb 12 2007 %F A000040 The last conjecture has been discussed by the math.research newsgroup recently. The sum, which is greater than pi/2, is shown in sequence A137245. [_T. D. Noe_, Jan 13 2009] %F A000040 A000005(a(n))=2; A002033(a(n+1))=1 [_Juri-Stepan Gerasimov_, Oct 17 2009] %F A000040 A001222(a(n))=1. [_Juri-Stepan Gerasimov_, Nov 10 2009] %F A000040 Contribution from _Gary Detlefs_, Sep 10 2010: (Start) %F A000040 Conjecture: %F A000040 a(n) ={n| n! mod n^2 = n(n-1)}, n<>4 %F A000040 a(n) ={n| n!*h(n) mod n = n-1},n<>4, where h(n) = sum(1/k,k=1..n) (End) %F A000040 First 15 primes; a(n) = p + abs(p-3/2) + 1/2, where p = m + int((m-3)/2), and m = n + int((n-2)/8) + int((n-4)/8), 1<=n<=15. [From Timothy Hopper (timothyhopper(AT)hotmail.co.uk), Oct 23 2010] %p A000040 A000040 := n->ithprime(n); [ seq(ithprime(i),i=1..100) ]; %t A000040 Table[ Prime[n], {n, 1, 60} ] %o A000040 (MAGMA) [ n : n in [2..500] | IsPrime(n) ]; %o A000040 (MAGMA) a := func< n | NthPrime(n) >; %o A000040 (PARI) a(n)=if(n<1,0,prime(n)) %o A000040 (SAGE) a = sloane.A000040; print a %o A000040 print a.list(58) # _Jaap Spies_, 2007 %o A000040 (Sage) prime_range(1,300) # _Zerinvary Lajos_, May 27 2009 %o A000040 (Maxima) A000040(n) := block( %o A000040 if n = 1 then return(2), %o A000040 return( next_prime(A000040(n-1))) %o A000040 )$ /* recursive, to be replaced if possible, R. J. Mathar, Feb 27 2012 */ %Y A000040 Cf. A002808, A008578, A006879, A006880, A000720 ("pi"), A001223 (differences between primes). %Y A000040 Sequences listing r-almost primes; that is the n such that A001222(n) = r: this sequence (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011 %Y A000040 Cf. primes in lexicographic order: A210757, A210758, A210759, A210760, A210761. %Y A000040 Cf. A003558, A179480 (relating to the Quasi-order theorem of Hilton and Pedersen). %K A000040 core,nonn,nice,easy %O A000040 1,1 %A A000040 _N. J. A. Sloane_. %E A000040 Additional links contributed by _Lekraj Beedassy_, Dec 23 2003 %E A000040 Additional comments from _Jonathan Sondow_, Dec 27 2004 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE