IP331.com | Online Tools
HomeNumber Theory ToolsSemiprime Number Finder

Semiprime Number Finder

Enter a positive integer to check if it is the product of exactly two primes

Enter Number

Semiprime Definition

n = p x q where p,q are primes (may be equal)
Semiprime = 2-almost prime = pq number
Examples: 4(2x2), 6(2x3), 9(3x3), 10(2x5)
RSA modulus must be a large semiprime

A semiprime is a composite number that factors into exactly two prime numbers (counting multiplicities). They are the simplest class of composite numbers and are fundamental to modern cryptography.

1 is not semiprime. Primes are not semiprime (they have only one factor). n=4=2x2 is semiprime (two factors, counting multiplicity).

What Is a Semiprime?

A semiprime is a natural number that is the product of exactly two primes. These numbers sit between primes and general composites in complexity. Their name comes from semi (half) + prime, indicating they are products of two primes.

Square Semiprime

p^2 where p is prime: 4,9,25,49,121. Two factors (both the same prime). Also called prime squares.

Distinct Semiprime

p x q where p != q: 6,10,14,15,21,22,26,33,34,35. The most common type.

RSA Connection

RSA moduli are semiprimes with two large distinct primes (hundreds of digits). Factoring these is infeasible, ensuring security.

Density

Semiprime density ~ (log log n)/log n. There are about 10^10 semiprimes below 10^18. They become rarer relative to all numbers as n grows.

Teaching Example: Test 15. Factor: 15 = 3 x 5. Two prime factors? Yes (3 and 5). Both are prime? Yes. 15 IS semiprime. Test 12: 12 = 2 x 2 x 3 (3 prime factors). Not semiprime. Test 13: prime (1 factor). Not semiprime. Test 14: 14 = 2 x 7. Semiprime!

Applications

RSA Cryptography Number Theory Prime Research Factorization Cyptography Education

FAQs about Semiprime Numbers

What is a semiprime?
A composite that is the product of exactly two primes. 15=3x5 is semiprime. 12=2x2x3 is not (3 factors). 13 is prime (1 factor).
Is 4 a semiprime?
Yes! 4 = 2 x 2. Two prime factors (both 2, counting multiplicity). 4 is the smallest semiprime. Also called a prime square.
Why are semiprimes important for RSA?
RSA modulus N = p x q is a large semiprime. Factoring N breaks RSA, so difficulty of factoring large semiprimes ensures security.
What is the largest factored semiprime?
RSA-250 (829 bits) was factored in 2020. It has 250 decimal digits. Factoring took about 2,700 core-years of computing time.

More Number Theory Tools

Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.

© 2026 IP331.com — Free Online Tools. All rights reserved.

About · Contact · Privacy Policy · Cookie Policy · Terms of Use · Disclaimer · Sitemap