Interprime Calculator

Input a number to check if it's an interprime, or input a range to generate all interprimes within it.

Interprime Check or Generate

What is an Interprime?

An interprime is the arithmetic mean of two consecutive odd prime numbers (excluding 2, the only even prime number). If \( p \) and \( q \) are two consecutive odd prime numbers, the interprime can be calculated using the formula: \( \text{Interprime} = \frac{p + q}{2} \) Since \( p \) and \( q \) are prime numbers, their arithmetic mean is never a prime number. Therefore, an interprime is always a composite number.

How to Determine an Interprime?

  1. Check if the number is prime: If the number \( n \) is a prime, it cannot be an interprime.
  2. Find adjacent primes: Identify the two odd primes \( p \) and \( q \) that are closest to \( n \).
  3. Calculate the arithmetic mean: If both \( p \) and \( q \) exist, compute their mean. If either \( p \) or \( q \) is missing, \( n \) is not an interprime.
  4. Compare results: If the arithmetic mean equals \( n \), it is an interprime; otherwise, it is not.

Examples

Example 1: Is 234 an Interprime?

Solution:

1. Check primality:

234 is not a prime number.

2. Find adjacent primes:

The closest primes to 234 are 233 and 239.

3. Calculate the mean:

\(\frac{233 + 239}{2} = \frac{472}{2} = 236\).

Result: Since \( 234 \neq 236 \), 234 is not an interprime.

Example 2: Is 306 an Interprime?

Solution:

1. Check primality:

306 is not a prime number.

2. Find adjacent primes:

The closest primes to 306 are 293 and 307.

3. Calculate the mean:

\(\frac{293 + 307}{2} = \frac{600}{2} = 300 \).

Result: Since \( 306 \neq 300 \), 306 is not an interprime.

Example 3: Is 2022 an Interprime?

Solution:

1. Check primality:

2022 is not a prime number.

2. Find adjacent primes:

The closest primes to 2022 are 2017 and 2027.

3. Calculate the mean:

\(\frac{2017 + 2027}{2} = \frac{4044}{2} = 2022\).

Result: Since \( 2022 = 2022 \), it is an interprime.

The First 100 Interprimes

  • 4
  • 6
  • 9
  • 12
  • 15
  • 18
  • 21
  • 26
  • 30
  • 34
  • 39
  • 42
  • 45
  • 50
  • 56
  • 60
  • 64
  • 69
  • 72
  • 76
  • 81
  • 86
  • 93
  • 99
  • 102
  • 105
  • 108
  • 111
  • 120
  • 129
  • 134
  • 138
  • 144
  • 150
  • 154
  • 160
  • 165
  • 170
  • 176
  • 180
  • 186
  • 192
  • 195
  • 198
  • 205
  • 217
  • 225
  • 228
  • 231
  • 236
  • 240
  • 246
  • 254
  • 260
  • 266
  • 270
  • 274
  • 279
  • 282
  • 288
  • 300
  • 309
  • 312
  • 315
  • 324
  • 334
  • 342
  • 348
  • 351
  • 356
  • 363
  • 370
  • 376
  • 381
  • 386
  • 393
  • 399
  • 405
  • 414
  • 420
  • 426
  • 432
  • 436
  • 441
  • 446
  • 453
  • 459
  • 462
  • 465
  • 473
  • 483
  • 489
  • 495
  • 501
  • 506
  • 515
  • 522
  • 532
  • 544
  • 552