Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Mathematical Functions / Number Theory  /
Prime

  • Prime[ n ] gives the n prime number.
  • Prime[1] is 2.
  • On most computer systems, Prime[ n ] for n up to can be obtained quite quickly.
  • See the Mathematica book: Section 3.2.4.
  • See also Implementation NotesA.9.44.7MainBookLinkOldButtonDataA.9.44.7.
  • See also: FactorInteger, PrimeQ, PrimePi.
  • Related package: NumberTheory`NumberTheoryFunctions`.

    Further Examples

    Here is a list of the first 100 primes.

    In[1]:=

    Out[1]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.