Semiprime Calculator

Input a number to check if it's a semiprime, or specify a range to generate all semiprime numbers within that range.

Semiprime Check or Generate

What Is a Semiprime?

A semiprime is a positive integer that is the product of exactly two prime numbers, which may be the same. For example, 4 (2×2), 6 (2×3), 9 (3×3), and 15 (3×5) are all semiprime numbers.

How to Determine If a Number Is a Semiprime

  1. For the given number \( n \), start testing divisors \( p \) from 2 onward.
  2. If \( p \) is a factor of \( n \), compute \( q = n / p \).
  3. Check if both \( p \) and \( q \) are prime.
  4. If such a pair \( (p, q) \) is found, \( n \) is a semiprime. Otherwise, it is not.

Examples

Example 1: Is 15 a Semiprime?

Solution:

Factors of 15:

\( 15 = 3 \times 5 \), where both 3 and 5 are prime numbers.

Result: 15 is a semiprime.

Example 2: Is 28 a Semiprime?

Solution:

Factors of 28:

\( 28 = 2 \times 14 \), but 14 is not a prime number.

\( 28 = 4 \times 7 \), but 4 is not a prime number.

\( 28 = 7 \times 4 \), but 4 is not a prime number.

\( 28 = 14 \times 2 \), but 14 is not a prime number.

Result: 28 is not a semiprime.

Example 3: Is 2021 a Semiprime?

Solution:

Factors of 2021: 1, 43, 47, 2021

\( 2021 = 43 \times 47 \), where both 43 and 47 are prime numbers.

Result: 2021 is a semiprime.

First 100 Semiprimes

  • 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
  • 106
  • 111
  • 115
  • 118
  • 119
  • 121
  • 122
  • 123
  • 129
  • 133
  • 134
  • 141
  • 142
  • 143
  • 145
  • 146
  • 155
  • 158
  • 159
  • 161
  • 166
  • 169
  • 177
  • 178
  • 183
  • 185
  • 187
  • 194
  • 201
  • 202
  • 203
  • 205
  • 206
  • 209
  • 213
  • 214
  • 215
  • 217
  • 218
  • 219
  • 221
  • 226
  • 235
  • 237
  • 247
  • 249
  • 253
  • 254
  • 259
  • 262
  • 265
  • 267
  • 274
  • 278
  • 287
  • 289
  • 291
  • 295
  • 298
  • 299
  • 301
  • 302
  • 303
  • 305
  • 309
  • 314