Enter a positive integer to check if it is the product of exactly two primes
Enter Number
Result
Verdict
-
Prime Factorization
-
Detailed Derivation
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!
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.