Is 31 a Prime Number?

YES — PRIME NUMBER

Yes, 31 is a prime number. Its only positive divisors are 1 and 31 (making it the 11th prime number).

Prime Factorization
31
Positive Divisors
2
Previous Prime
Next Prime

Step-by-Step Proof: Why 31 Is Prime

  1. 1

    Compute the square-root trial limit: √31 ≈ 5.57, so we only need to test prime divisors up to ⌊√31⌋ = 5.

  2. 2

    There are 3 primes ≤ 5: 2, 3, 5.

  3. 3

    Dividing 31 by each of those primes leaves a non-zero remainder every time — proving conclusively that 31 has no proper prime divisors and is a prime number.

Prime Factorization & All Factors of 31

Open 31 in Visual Factor Tree →

31 has 2 positive divisors with divisor sum σ(31) = 32 and aliquot sum s(31) = 1 (Deficient number).

1 31

Mathematical Properties & Number Bases of 31

Mersenne Prime (2^5 − 1) Twin Prime
Parity
Odd
Aliquot Class
Deficient number
Twin Prime
Yes (paired with 29)
Binary (Base 2)
11111
Octal (Base 8)
37
Hexadecimal (Base 16)
0x1F

Test Another Number Instantly

Enter any integer (including 100+ digit BigInt numbers) to test primality in our full Prime Number Checker.

Frequently Asked Questions About 31

Is 31 a prime number or a composite number?

Yes, 31 is a prime number. Its only positive divisors are 1 and 31 (making it the 11th prime number).

What are all the positive factors (divisors) of 31?

The 2 positive divisors of 31 are: 1, 31. Their sum is σ(31) = 32.

What is the prime factorization of 31?

Because 31 is already prime, its prime factorization is simply 31.

What are the closest prime numbers before and after 31?

The previous prime before 31 is 29, and the next prime after 31 is 37.

← Previous curated number: 29 Next curated number: 33 →

Prime Number Tools & Reference Guides

Explore dedicated charts, visual factor trees, range generators, and step-by-step proofs for commonly searched numbers.