In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a semiprime is a
natural number
In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. Some start counting with 0, defining the natural numbers as the non-negative integers , while others start with 1, defining them as the positive in ...
that is the
product of exactly two
prime number
A prime number (or a prime) is a natural number greater than 1 that is not a Product (mathematics), product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime ...
s. The two primes in the product may equal each other, so the semiprimes include the
squares
In geometry, a square is a regular polygon, regular quadrilateral. It has four straight sides of equal length and four equal angles. Squares are special cases of rectangles, which have four equal angles, and of rhombuses, which have four equal si ...
of prime numbers.
Because there are infinitely many prime numbers, there are also infinitely many semiprimes. Semiprimes are also called biprimes, since they include two primes, or second numbers, by analogy with how "prime" means "first". Alternatively non-prime semiprimes are called almost-prime numbers, specifically the "2-almost-prime" biprime and "3-almost-prime" triprime
Examples and variations
The semiprimes less than 100 are:
Semiprimes that are not square numbers are called discrete, distinct, or squarefree semiprimes:
The semiprimes are the case
of the
-
almost primes, numbers with exactly
prime factors. However some sources use "semiprime" to refer to a larger set of numbers, the numbers with at most two prime factors (including unit (1), primes, and semiprimes). These are:
Formula for number of semiprimes
A semiprime counting formula was discovered by E. Noel and G. Panos in 2005. Let
denote the number of semiprimes less than or equal to ''n''. Then