ArticleslgStudy

mathematics

Semiprime

Semiprime is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Semiprime rather than just read about it. In short: In number theory, 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.

Semiprime — main illustration
Semiprime — illustration

Key takeaways

  • Semiprime belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Semiprime to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Semiprime from memory before moving on to harder problems.

Reference excerpt

In number theory, 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 semiprime numbers. Semiprimes are also called biprimes, since they include two primes, or second numbers, by analogy with how "prime" means "first". Alternatively, 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 k = 2 {\displaystyle k=2} of the k {\displaystyle k} -almost primes, numbers with exactly k {\displaystyle k} 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 Let π 2 ( n ) {\displaystyle \pi _{2}(n)} denote the number of semiprimes less than or equal to n. Then π 2 ( n ) = ∑ k = 1 π ( n ) [ π ( n p k ) − k + 1 ] {\displaystyle \pi _{2}(n)=\sum _{k=1}^{\pi \left({\sqrt {n}}\right)}\left[\pi \left({\frac {n}{p_{k}}}\right)-k+1\right]}

where π ( x ) {\displaystyle \pi (x)} is the prime-counting function and p k {\displaystyle p_{k}} denotes the kth prime. To see this, take p k {\displaystyle p_{k}} to be the smaller prime factor. Then p k ≤ n {\displaystyle p_{k}\leq {\sqrt {n}}} , and the larger factor may be any prime q {\displaystyle q} satisfying p k ≤ q ≤ n / p k {\displaystyle p_{k}\leq q\leq n/p_{k}} . The number of such primes is π ( n / p k ) − π ( p k − 1 ) {\displaystyle \pi (n/p_{k})-\pi (p_{k}-1)} . Since p k {\displaystyle p_{k}} is the kth prime, π ( p k − 1 ) = k − 1 {\displaystyle \pi (p_{k}-1)=k-1} , giving the summand π ( n / p k ) − k + 1 {\displaystyle \pi (n/p_{k})-k+1} .

Properties Semiprime numbers have no composite numbers as factors other than themselves. 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 n = p q {\displaystyle n=pq} (with p ≠ q {\displaystyle p\neq q} ) the value of Euler's totient function φ ( n ) {\displaystyle \varphi (n)} (the number of positive integers less than or equal to n {\displaystyle n} that are relatively prime to n {\displaystyle n} ) takes the simple form

φ ( n ) = ( p − 1 ) ( q − 1 ) = n − ( p + q ) + 1. {\displaystyle \varphi (n)=(p-1)(q-1)=n-(p+q)+1.}

This calculation is an important part of the application of semiprimes in the RSA cryptosystem. For a square semiprime n = p 2 {\displaystyle n=p^{2}} , the formula is again simple:

φ ( n ) = p ( p − 1 ) = n − p . {\displaystyle \varphi (n)=p(p-1)=n-p.}

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Semiprime

Start with the simplest possible case. Write down what Semiprime claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Semiprime before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Semiprime ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Semiprime

In research
Semiprime appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Semiprime in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Semiprime is common in secondary-school and first-year university syllabi. It links to neighbouring topics Integer sequences, Prime numbers, Theory of cryptography, so understanding it makes those chapters shorter.
In everyday life
Look for Semiprime outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Semiprime in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Semiprime means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Semiprime out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Semiprime in simple terms?

In number theory, 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.

Why does Semiprime matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Semiprime?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Semiprime.

Tags

  • Integer sequences
  • Prime numbers
  • Theory of cryptography

Keep exploring