Browse Definitions:

prime number

A prime number is a whole number greater than 1 whose only factors are 1 and itself. A factor is a whole numbers that can be divided evenly into another number. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Numbers that have more than two factors are called composite numbers. The number 1 is neither prime nor composite. 

prime number chart

For every prime number p, there exists a prime number p' such that p' is greater than p.  This mathematical proof, which was demonstrated in ancient times by the Greek mathematician Euclid, validates the concept that there is no "largest" prime number. As the set of natural numbers N = {1, 2, 3, ...} proceeds, however, prime numbers generally become less frequent and are more difficult to find in a reasonable amount of time. As of this writing, the largest known prime number has more than 23 million digits. It is referred to as M77232917 and has one million more digits than the previous record holder. 

How to determine if a number is prime

A computer can be used to test extremely large numbers to see if they are prime.  But, because there is no limit to how large a natural number can be, there is always a point where testing in this manner becomes too great a task even for the most powerful supercomputers.

Various algorithms have been formulated in an attempt to generate ever-larger prime numbers. For example, suppose n is a whole number, and it is not yet known if n is prime or composite. First, take the square root (or the 1/2 power) of n; then round this number up to the next highest whole number and call the result m.  Then find all of the following quotients:

qm = n / m
q(m-1) = n / (m-1)
q(m-2) = n / (m-2)
q(m-3) = n / (m-3)
. . .
q3 = n / 3
q2 = n / 2

The number n is prime if -- and only if -- none of the q's, as derived above, are whole numbers.

Mersenne and Fermat primes

Mersenne prime must be reducible to the form 2 n - 1, where n is a prime number. The first few known values of n that produce Mersenne primes are where n = 2, n = 3, n = 5, n = 7, n = 13, n = 17, n = 19, n = 31, n = 61, and n = 89.

Fermat prime is a Fermat number that is also a prime number . A Fermat number n is of the form 2 m + 1, where m is the n th power of 2 (that is, m = 2 n , where n is an integer). 

Prime numbers and cryptopgraphy

Encryption always follows a fundamental rule: the algorithm (the actual procedure being used) doesn't need to be kept secret, but the key does. Even the most sophisticated hacker in the world will be unable to decrypt data as long as the key remains secret -- and prime numbers are very useful for creating keys. For example, the strength of public/private key encryption lies in the fact that it's easy to calculate the product of two randomly chosen prime numbers, but it can be very difficult and time consuming to determine which two prime numbers were used to create an exteremely large product, when only the product is known.

In RSA (Rivest-Shamir-Adleman) public key cryptography, prime numbers are always supposed to be unique. The primes used by the Diffie-Hellman key exchange and the Digital Signature Standard (DSA) cryptography schemes, however, are frequently standardized and used by a large number of applications.

This was last updated in January 2018

Continue Reading About prime number

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

what are some prime numbers from 2 to 100 and i did not understand but thanks for trying.


File Extensions and File Formats


  • risk map (risk heat map)

    A risk map, also known as a risk heat map, is a data visualization tool for communicating specific risks an organization faces. A...

  • internal audit (IA)

    An internal audit (IA) is an organizational initiative to monitor and analyze its own business operations in order to determine ...

  • pure risk (absolute risk)

    Pure risk, also called absolute risk, is a category of threat that is beyond human control and has only one possible outcome if ...


  • cloud ecosystem

    A cloud ecosystem is a complex system of interdependent components that all work together to enable cloud services.

  • cloud services

    Cloud services is an umbrella term that may refer to a variety of resources provided over the internet, or to professional ...

  • uncloud (de-cloud)

    The term uncloud describes the action or process of removing applications and data from a cloud computing platform.


  • federated identity management (FIM)

    Federated identity management (FIM) is an arrangement that can be made among multiple enterprises to let subscribers use the same...

  • cross-site scripting (XSS)

    Cross-site scripting (XSS) is a type of injection security attack in which an attacker injects data, such as a malicious script, ...

  • firewall

    In computing, a firewall is software or firmware that enforces a set of rules about what data packets will be allowed to enter or...




  • bad block

    A bad block is an area of storage media that is no longer reliable for storing and retrieving data because it has been physically...

  • all-flash array (AFA)

    An all-flash array (AFA), also known as a solid-state storage disk system, is an external storage array that uses only flash ...

  • volume manager

    A volume manager is software within an operating system (OS) that controls capacity allocation for storage arrays.


  • hybrid hard disk drive (HDD)

    A hybrid hard disk drive is an electromechanical spinning hard disk that contains some amount of NAND Flash memory.