Semiprime
View on WikipediaIn mathematics, a semiprime is a natural number that is the product of exactly two prime numbers. The two primes in the product may equal each other, so the semiprimes include the squares of prime numbers. Because there are infinitely many prime numbers, there are also infinitely many semiprimes. Semiprimes are also called biprimes,[1] since they include two primes, or second numbers,[2] 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.[3]
Examples and variations
[edit]The semiprimes less than 100 are:
4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, and 95 (sequence A001358 in the OEIS)
Semiprimes that are not square numbers are called discrete, distinct, or squarefree semiprimes:
6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, ... (sequence A006881 in the OEIS)
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).[4] These are:
Formula for number of semiprimes
[edit]A semiprime counting formula was discovered by E. Noel and G. Panos in 2005.[5] Let denote the number of semiprimes less than or equal to n. Then where is the prime-counting function and denotes the kth prime.[6]
Properties
[edit]Semiprime numbers have no composite numbers as factors other than themselves.[7] For example, the number 26 is semiprime and its only factors are 1, 2, 13, and 26, of which only 26 is composite.
For a squarefree semiprime (with ) the value of Euler's totient function (the number of positive integers less than or equal to that are relatively prime to ) takes the simple form This calculation is an important part of the application of semiprimes in the RSA cryptosystem.[8] For a square semiprime , the formula is again simple:[8]
Applications
[edit]
Semiprimes are highly useful in the area of cryptography and number theory, most notably in public key cryptography, where they are used by RSA and pseudorandom number generators such as Blum Blum Shub. These methods rely on the fact that finding two large primes and multiplying them together (resulting in a semiprime) is computationally simple, whereas finding the original factors appears to be difficult. In the RSA Factoring Challenge, RSA Security offered prizes for the factoring of specific large semiprimes and several prizes were awarded. The original RSA Factoring Challenge was issued in 1991, and was replaced in 2001 by the New RSA Factoring Challenge, which was later withdrawn in 2007.[9]
In 1974 the Arecibo message was sent with a radio signal aimed at a star cluster. It consisted of binary digits intended to be interpreted as a bitmap image. The number was chosen because it is a semiprime and therefore can be arranged into a rectangular image in only two distinct ways (23 rows and 73 columns, or 73 rows and 23 columns).[10]
See also
[edit]- Chen's theorem
- Sphenic number, a product of three distinct primes
- Parity problem (sieve theory)
References
[edit]- ^ Sloane, N. J. A. (ed.). "Sequence A001358". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation.
- ^ Nowicki, Andrzej (2013-07-01), Second numbers in arithmetic progressions, arXiv:1306.6424
- ^ Conway, J. H. (2008-06-18), Counting Groups: Gnus, Moas, and Other Exotica."
- ^ Stewart, Ian (2010). Professor Stewart's Cabinet of Mathematical Curiosities. Profile Books. p. 154. ISBN 9781847651280.
- ^ "Semiprime (Wolfram MathWorld)". Wolfram MathWorld. Retrieved 16 December 2024.
- ^ Ishmukhametov, Sh. T.; Sharifullina, F. F. (2014). "On distribution of semiprime numbers". Russian Mathematics. 58 (8): 43–48. doi:10.3103/S1066369X14080052. MR 3306238. S2CID 122410656.
- ^ French, John Homer (1889). Advanced Arithmetic for Secondary Schools. New York: Harper & Brothers. p. 53.
- ^ a b Cozzens, Margaret; Miller, Steven J. (2013). The Mathematics of Encryption: An Elementary Introduction. Mathematical World. Vol. 29. American Mathematical Society. p. 237. ISBN 9780821883211.
- ^ "The RSA Factoring Challenge is no longer active". RSA Laboratories. Archived from the original on 2013-07-27.
- ^ du Sautoy, Marcus (2011). The Number Mysteries: A Mathematical Odyssey through Everyday Life. St. Martin's Press. p. 19. ISBN 9780230120280.
External links
[edit]Semiprime
View on GrokipediaDefinition and Fundamentals
Definition
A semiprime is a natural number that is the product of exactly two prime numbers, not necessarily distinct.[1] For instance, and are semiprimes.[1] Formally, a semiprime can be expressed as , where and are prime numbers with .[5] Semiprimes differ from prime numbers, which have only one prime factor (themselves), and from higher prime powers such as , which involve more than two identical prime factors.[1] The number 1 is excluded, as it is not the product of any primes.[5] The term "semiprime" derives from "semi-" combined with "prime" and is used in number theory to describe such numbers with exactly two prime factors, counting multiplicity.[6]Types
Semiprimes can be classified based on whether their prime factors are identical or distinct, as well as by their parity and square-freeness. A square semiprime is the square of a prime number, denoted as $ n = p^2 $ where $ p $ is prime; examples include 4 ($ 2^2 3^2 5^2 $).[1] These form the sequence of prime squares, cataloged in OEIS A001248. In contrast, a non-square semiprime, also known as a distinct or discrete semiprime, is the product of two distinct primes, $ n = p \times q $ with $ p \neq q $ and both prime. Examples include 6 ($ 2 \times 3 2 \times 5 3 \times 5 $).[1] These are precisely the square-free semiprimes, meaning they have no squared prime factors, and they constitute the sequence in OEIS A006881.[7] Semiprimes can further be categorized by parity. An even semiprime is divisible by 2, which implies one of its prime factors must be 2, yielding forms like $ 2 \times p $ where $ p $ is an odd prime (or $ 2^2 = 4 $ for the square case); representative examples are 6, 10, and 14.[1][8] Conversely, an odd semiprime has both prime factors odd, resulting in products like $ p \times q $ with $ p $ and $ q $ odd primes (or $ p^2 $ for odd $ p 3 \times 7 $), and 25.[1]Examples
Small Semiprimes
The smallest semiprimes are the natural numbers greater than 1 that have exactly two prime factors, counted with multiplicity, denoted by the condition , where is the total number of prime factors of (with repetition).[9] This includes both squares of primes () and products of two distinct primes (). The sequence of semiprimes begins with 4, 6, 9, 10, and continues, with all terms up to 100 listed below along with their factorizations.[5][1] Among these, even semiprimes except for 4 are all of the form , where is an odd prime, since any even number greater than 2 must include 2 as a factor and, to remain a semiprime, the cofactor must be prime.[1] The density of semiprimes appears to increase initially in this range, with 34 such numbers up to 100, illustrating their relative frequency among small composites.[5]| Semiprime | Factorization |
|---|---|
| 4 | |
| 6 | |
| 9 | |
| 10 | |
| 14 | |
| 15 | |
| 21 | |
| 22 | |
| 25 | |
| 26 | |
| 33 | |
| 34 | |
| 35 | |
| 38 | |
| 39 | |
| 46 | |
| 49 | |
| 51 | |
| 55 | |
| 57 | |
| 58 | |
| 62 | |
| 65 | |
| 69 | |
| 74 | |
| 77 | |
| 82 | |
| 85 | |
| 86 | |
| 87 | |
| 91 | |
| 93 | |
| 94 | |
| 95 |
Notable Examples
1 is excluded from the class of semiprimes, as it is not the product of two prime numbers; semiprimes require exactly two prime factors, counting multiplicity, and 1 has none.[1] The smallest odd semiprime with distinct prime factors is 15 = 3 × 5, marking an early historical example in the study of composite numbers beyond even semiprimes like 4 = 2 × 2 or 6 = 2 × 3.[1] In number theory puzzles and primality testing, semiprimes like 91 = 7 × 13 serve as notable examples of Fermat pseudoprimes; specifically, 91 is a pseudoprime to base 3, satisfying 3^{90} ≡ 1 (mod 91) despite being composite, which highlights their role in deceiving certain primality tests.[10] In contrast, the first Carmichael number, 561 = 3 × 11 × 17, is a product of three primes and passes Fermat's test for all bases coprime to it, but semiprimes like 91 illustrate similar deceptive behavior for specific bases. Semiprimes appear infrequently as Mersenne numbers , but notable cases include , the smallest Mersenne number that is a strong pseudoprime to base 2, and , the smallest such semiprime overall. Other indices yielding Mersenne semiprimes include 9 (), 23 (), and 37, underscoring their rarity and utility in studying composite Mersenne forms.[11] Among large-scale records, the RSA-250 semiprime, a 250-decimal-digit number (~829 bits) from the RSA Factoring Challenge, represents a milestone as the largest such semiprime fully factored to date (as of 2025), achieved in February 2020 using the general number field sieve after approximately 2700 core-years of computation; its prime factors are two 125-digit primes, demonstrating the practical limits of classical factoring algorithms.[12]Properties
Arithmetic Properties
A semiprime , where and are primes (not necessarily distinct), exhibits specific divisibility properties determined by its prime factorization. If is square-free, meaning , then the positive divisors of are exactly , , , and , yielding precisely four divisors.[13] In contrast, if is the square of a prime, so , the divisors are , , and , resulting in exactly three divisors.[13] These counts distinguish semiprimes from primes (two divisors) and numbers with more prime factors (more than four divisors for square-free cases).[14] The sum of divisors function , which sums all positive divisors of , takes a straightforward form for semiprimes due to the multiplicativity of . For a square-free semiprime with distinct primes and , .[15] For a prime square , .[15] These expressions arise directly from the geometric series sum for each prime power factor.[14] Euler's totient function , counting the integers up to that are coprime to , is also multiplicative and simplifies for semiprimes. For with , .[16] When , .[16] These formulas reflect the exclusion of multiples of and from the count of coprimes. The greatest common divisor (GCD) and least common multiple (LCM) of a semiprime with another integer follow from their prime factorizations. For two square-free semiprimes and with all distinct primes, and . If they share one prime, say but , then and . In general, is the product of the shared prime factors raised to the minimum exponent, while uses the maximum exponents. Semiprimes are not closed under multiplication: the product of two semiprimes is generally not a semiprime. For instance, the product of two square-free semiprimes and (all distinct primes) equals , which has four distinct prime factors and thus more than two.[1] Even if some primes coincide, the result typically has more than two prime factors counting multiplicity, unless specifically arranged to reduce to exactly two.[1]Analytic Properties
Semiprimes are asymptotically equidistributed between the odd residue classes modulo 4, with the number ≤ x congruent to 1 mod 4 and to 3 mod 4 each ∼ (1/2) x (log log x) / log x. While temporary biases may occur due to the distribution of primes, the leading asymptotics show no disparity. More generally, semiprimes ≤ x are asymptotically equidistributed among the residue classes a mod q with gcd(a, q) = 1, each with asymptotic ∼ [1/φ(q)] x (log log x) / log x.[17] A direct link exists between Sophie Germain primes and semiprimes: if is a Sophie Germain prime (i.e., both and are prime), then the product is a semiprime.[18] This construction yields specific semiprimes where the factors are related by the doubling relation, and such products appear in studies of prime chains and Cunningham chains of length 2.[18] Semiprimes can behave like primes under certain probabilistic tests, notably as Fermat pseudoprimes. A composite number is a Fermat pseudoprime to base if , despite not being prime; the smallest such semiprime is 341 = 11 × 31, which satisfies .[19] These instances arise when the factors of the semiprime share compatible orders in the multiplicative group, fooling the Fermat test and illustrating analytic similarities to primes in modular exponentiation.[19] The density of semiprimes in arithmetic progressions follows from extensions of the prime number theorem, with positive asymptotic density in progressions where . This mirrors the equidistribution of primes but scaled by the semiprime counting function , first established by Landau.[17] Landau's foundational work on this asymptotic underpins related unsolved problems, such as the infinitude of primes in certain forms that influence semiprime distributions.[17]Enumeration
Counting Formulas
The number of semiprimes less than or equal to a given positive real number , denoted , can be exactly determined using the prime-counting function , which gives the number of primes less than or equal to . The formula is| 10 | 4 |
| 100 | 34 |
| 1000 | 299 |
| 2625 |