Calculate The First N Emirp
An emirp is a prime number that remains prime when its digits are reversed. This calculator helps you find the first n emirps in sequence. Learn about their properties, discover interesting examples, and visualize the results.
What is an emirp?
An emirp (prime spelled backward) is a special type of prime number with a unique property: when you reverse its digits, the resulting number is also prime. For example, 13 is an emirp because both 13 and 31 are prime numbers.
Emirps are sometimes called "twisted primes" because they maintain their primality when reversed. They are a subset of reversible primes, which also include palindromic primes.
Key characteristics of emirps
- Must be prime numbers
- Must have at least two digits (single-digit primes cannot be reversed)
- The reversed number must also be prime
- Cannot be palindromic primes (which read the same forwards and backwards)
Emirps are relatively rare compared to regular primes. The sequence of emirps begins with 13, 17, 31, 37, 71, 73, 79, 97, 107, 113, and continues with larger numbers.
How to find emirps
Finding emirps involves checking prime numbers and verifying that their reversed counterparts are also prime. Here's the step-by-step process:
- Start with a prime number greater than 10
- Reverse its digits
- Check if the reversed number is also prime
- If both conditions are met, the number is an emirp
This process can be computationally intensive for large numbers, which is why calculators and programming algorithms are helpful for finding emirps efficiently.
Properties of emirps
Emirps exhibit several interesting mathematical properties:
- All emirps are odd numbers (except for the single-digit primes, which are excluded)
- They cannot end with 2, 4, 5, 6, or 8 because those would make the reversed number even and greater than 2, hence not prime
- Their digit sum is often odd, which is a property shared with many primes
- They are not palindromic (which would make them both primes and palindromes)
These properties help in identifying potential emirps without extensive computation, though they don't guarantee primality.
Example calculation
Let's find the first 5 emirps using the calculator:
Example: First 5 emirps
Input: n = 5
Calculation:
- 13 (prime) → 31 (prime) → emirp
- 17 (prime) → 71 (prime) → emirp
- 31 (prime) → 13 (prime) → emirp
- 37 (prime) → 73 (prime) → emirp
- 71 (prime) → 17 (prime) → emirp
Result: [13, 17, 31, 37, 71]
This example demonstrates how the calculator systematically checks each prime number and verifies its reversed counterpart to identify emirps.
FAQ
- What is the difference between emirps and palindromic primes?
- Emirps are primes that remain prime when reversed, while palindromic primes read the same forwards and backwards. Examples include 13 (emirp) and 131 (palindromic prime).
- Are there any even emirps?
- No, because the only even prime is 2, and reversing its digits doesn't produce another prime number. All emirps must be odd.
- How many emirps are there?
- The sequence of emirps is infinite, but they become less frequent as numbers grow larger. The calculator can help find any number of emirps you specify.
- Can emirps be negative?
- No, by definition, emirps are positive prime numbers. Negative numbers and zero are not considered in this context.
- Are there any known patterns in emirp distribution?
- Emirps tend to cluster in certain ranges, but no general pattern has been discovered. The calculator helps identify these clusters by finding consecutive emirps.