The numbers between 30 and 40 whose only factors are one and themselves, also called prime numbers, are 31 and 37. Prime numbers are useful in generating numerical passwords or codes that are difficult to crack.
Prime numbers are defined as numbers that have only one and themselves as factors. The vast majority of whole numbers are either prime or composite. Composite numbers are those that have more than two factors, or numbers by which they are divisible. The only exception to this rule is the number one, which is neither prime nor composite. The primary practical application of prime numbers is cryptography algorithms, hash tables and random number generators.