Chen Prime Calculator
Primes
- Chen's definition: a prime p is a Chen prime when p + 2 is prime or semiprime (a product of exactly two primes, counted with multiplicity).
- Here p + 2 = 43.
- 43 is itself prime, the twin-prime case of the definition.
- That settles it - and for scale, there are 20 Chen primes up to 100; Chen proved infinitely many primes have p + 2 prime or semiprime.
The Chen Prime Calculator tells you whether a prime number p is a Chen prime — a prime where p + 2 is either prime or semiprime, meaning a product of exactly two primes. Enter a number and the calculator checks it, then reports the answer along with the reason. For example, 41 is a Chen prime because 41 + 2 = 43 is prime, the twin-prime case. By contrast, 43 is not a Chen prime: 43 + 2 = 45 = 3 x 3 x 5 has three prime factors, so it is neither prime nor semiprime. The calculator also lets you see the pattern in context: there are 20 Chen primes up to 100, the largest being 89.
The method behind the calculator is the standard definition of a Chen prime, so the answer follows directly from the accepted meaning of the term rather than from any shortcut or approximation. The idea traces to Chen Jingrun, who proved in 1973 that there are infinitely many primes p with p + 2 prime or semiprime — the closest proved result to the twin prime conjecture. This page shows the formula, step-by-step workings, worked examples and sources, so you can follow each check yourself and confirm the result.
Worked examples
Is 41 a Chen prime?
(0 - test a single number · 41)
| is 41 a Chen prime? | Yes - 41 + 2 = 43 is prime (a twin prime) |
| 41 + 2 | 43 |
| what 43 is | prime |
| Chen primes up to 100 | 20 |
Is 43 a Chen prime?
(0 - test a single number · 43)
| is 43 a Chen prime? | No - 43 + 2 = 45 is neither prime nor semiprime |
| 43 + 2 | 45 |
| what 45 is | neither |
| Chen primes up to 100 | 20 |
Chen primes up to 100
(1 - list up to a limit · 100)
| Chen primes up to 100 | 20 |
| largest in range | 89 |
| the full list | 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 47, 53, 59, 67, 71, 83, 89 |
| twin prime pairs at the same limit | 8 |
What is a Chen prime?
A Chen prime is a prime number p for which p + 2 is either prime or semiprime, meaning a product of exactly two primes. The definition comes from the Chinese mathematician Chen Jingrun, who set it out in 1973. The condition splits into two cases. In the first, p + 2 is itself prime, so p and p + 2 form a twin prime pair. In the second, p + 2 is a semiprime, the product of exactly two primes. Either way, the number two steps above p must have at most two prime factors.
The number 41 shows the first case. Because 41 + 2 = 43, and 43 is prime, 41 qualifies as a Chen prime through the twin-prime route. The pair 41 and 43 is a genuine twin prime pair, and that alone satisfies the definition. The neighboring number 43 does not qualify, which makes this pair a useful illustration of how the rule works. For 43, the test looks at 43 + 2 = 45. Since 45 = 3 x 3 x 5, it has three prime factors, so it is neither prime nor semiprime. That places 43 outside the Chen primes even though 43 is itself prime. The same two numbers, side by side, land on opposite sides of the definition.
The semiprime case is what makes the definition broader than the twin prime condition. A prime p can be a Chen prime even when p + 2 is composite, as long as that composite number has exactly two prime factors. This is why the count of Chen primes runs ahead of the count of twin primes: every prime at the start of a twin prime pair is a Chen prime, and the semiprime case adds more on top. The definition is precise about the count of factors, so a number with three or more prime factors, like 45, fails the test.
The concept is tied to one of the best-known results in prime number theory. Chen Jingrun proved in 1973 that there are infinitely many primes p such that p + 2 is prime or semiprime. That theorem is the closest proved result to the twin prime conjecture, which asserts that there are infinitely many twin primes. The twin prime conjecture itself remains unproved. Chen's result does not settle it, but it establishes that infinitely many primes sit two below a number with at most two prime factors, a weaker but proven statement.
Small ranges give a feel for how common these primes are. There are 20 Chen primes up to 100, and the largest of them is 89. Checking a number by hand takes only one step: add two, then count the prime factors of the result. If that count is one (the number is prime) or two (the number is semiprime), the original prime is a Chen prime. If the count is three or more, as with 45, it is not.
How the test works
The test for a Chen prime starts with the prime p and looks at the number two above it, p + 2. That neighbor is factored into primes, and the factors are counted with multiplicity — meaning a repeated factor counts each time it appears. So 45 = 3 x 3 x 5 counts as three prime factors, not two distinct ones. The rule is simple: keep p when the count is 1 (p + 2 is itself prime) or 2 (p + 2 is semiprime, a product of exactly two primes). Any other count disqualifies p.
Worked examples make the counting concrete. Take 41: 41 + 2 = 43, and 43 is prime, so the factor count is 1. That is the twin-prime case, and 41 passes as a Chen prime. Now take 43: 43 + 2 = 45 = 3 x 3 x 5. Counting with multiplicity gives three prime factors, so 45 is neither prime nor semiprime, and 43 is not a Chen prime. Notice that the two tests sit side by side: 41 passes because its neighbor is prime, while 43 fails because its neighbor has one factor too many.
The multiplicity rule is what separates a semiprime from a number that merely looks close to one. A semiprime has exactly two prime factors, so squares of primes such as 9 = 3 x 3 and 25 = 5 x 5 qualify, as do products of two different primes such as 6 = 2 x 3 or 35 = 5 x 7. A number like 45 does not, because the repeated 3 pushes the count to three. Checking the count with multiplicity therefore handles both cases in one step: the prime neighbor gives a count of 1, and the semiprime neighbor gives a count of 2.
Running the test upward shows how often it succeeds. There are 20 Chen primes up to 100, the largest being 89. That density is part of why the concept matters: Chen Jingrun proved in 1973 that there are infinitely many primes p with p + 2 prime or semiprime. This is the closest proved result to the twin prime conjecture, which asks for infinitely many primes p with p + 2 prime — the count-of-1 case alone. The Chen prime test relaxes that requirement just enough to allow the count-of-2 case, and that relaxation is what made an infinite-family proof possible.
To apply the test yourself, begin with a prime p, add 2, and factor the result completely. Count every prime factor, including repeats, then keep p only if the total is 1 or 2. This procedure is the whole test — no shortcuts or extra conditions are needed, and it works the same way for small numbers like 41 and for much larger primes.
The Chen primes up to 100
The table below lists all 20 Chen primes up to 100. Because a Chen prime is a prime p where p + 2 is prime or semiprime — a product of exactly two primes — each entry is checked against that single condition. The largest Chen prime in this range is 89, and the count stops at 20.
Every twin prime's lower member qualifies automatically. If p is the smaller half of a twin prime pair, then p + 2 is itself prime, which is the first and simplest way to satisfy the definition. So the lower member of every twin prime pair up to 100 appears in the table without any further checking. The number 41 is a clear example: 41 + 2 = 43, and 43 is prime, so 41 is a Chen prime through the twin-prime case.
The semiprime route is what makes the list longer than a list of twin-prime lower members alone. A prime can also qualify when p + 2 is a product of exactly two primes, even though p + 2 is not prime. The boundary between the two cases is sharp, and 43 shows why. Although 43 is prime, 43 + 2 = 45 = 3 x 3 x 5, which has three prime factors — so 45 is neither prime nor semiprime, and 43 is not a Chen prime. A number can be prime and still fail the test.
This finite table sits on top of a deep result. Chen Jingrun proved in 1973 that there are infinitely many primes p with p + 2 prime or semiprime — the closest proved result to the twin prime conjecture. The 20 entries below are simply what that theorem looks like when you stop at 100.
| # | Chen prime p | p + 2 | Why it qualifies |
|---|---|---|---|
| 1 | 3 | 5 | prime (twin-prime case) |
| 2 | 5 | 7 | prime (twin-prime case) |
| 3 | 7 | 9 | semiprime |
| 4 | 11 | 13 | prime (twin-prime case) |
| 5 | 13 | 15 | semiprime |
| 6 | 17 | 19 | prime (twin-prime case) |
| 7 | 19 | 21 | semiprime |
| 8 | 23 | 25 | semiprime |
| 9 | 29 | 31 | prime (twin-prime case) |
| 10 | 31 | 33 | semiprime |
| 11 | 37 | 39 | semiprime |
| 12 | 41 | 43 | prime (twin-prime case) |
| 13 | 47 | 49 | semiprime |
| 14 | 53 | 55 | semiprime |
| 15 | 59 | 61 | prime (twin-prime case) |
| 16 | 67 | 69 | semiprime |
| 17 | 71 | 73 | prime (twin-prime case) |
| 18 | 79 | 81 | semiprime |
| 19 | 83 | 85 | semiprime |
| 20 | 89 | 91 | semiprime |
Why Chen primes matter
Chen's theorem is the strongest result anyone has proved toward the twin prime conjecture, and it is why the term Chen prime earns a place in number theory rather than just in a calculator's list of categories. The twin prime conjecture says there are infinitely many primes p for which p + 2 is also prime. That statement remains unproved. In 1973, Chen Jingrun proved something close: there are infinitely many primes p with p + 2 prime or semiprime, meaning p + 2 is a product of exactly two primes. The gap between "prime" and "prime or semiprime" is small to state and enormous to close, and no one has closed it in the decades since.
The definition is easiest to see in examples. A Chen prime is a prime p where p + 2 is prime or semiprime. Take 41: since 41 + 2 = 43 is prime, 41 is a Chen prime through the twin-prime case, the cleanest way a number can qualify. Now take 43: 43 + 2 = 45 = 3 x 3 x 5, which has three prime factors, so 45 is neither prime nor semiprime, and 43 is not a Chen prime. The two numbers sit side by side on the number line, yet only one passes the test. That is the character of the definition: it is generous enough to admit semiprimes, but not so generous that every prime qualifies.
The counts stay modest at small sizes. There are 20 Chen primes up to 100, the largest being 89. That figure is worth keeping in mind when reading about the infinitude result, because it shows how gradually the set builds: the theorem guarantees infinitely many such primes, but it says nothing about how densely they appear, and the early count is a reminder that each one has to be checked on its own terms.
The reason Chen primes matter is the position they occupy in the long effort to prove the twin prime conjecture. Chen's 1973 result is the closest proved result to that conjecture. It does not deliver infinitely many twin primes, because some of the qualifying p have p + 2 semiprime rather than prime. But it shows that infinitely many primes p come within a fixed, tightly restricted distance of the twin-prime pattern, and it does so with a proof that has stood. For anyone studying prime gaps, the Chen primes are the concrete objects behind that theorem: a list you can generate, inspect and compare against the twin primes themselves. The calculator on this page applies the definition directly, so you can see which primes qualify, which fall short like 43, and where the two families overlap.
FAQs
What is a Chen prime?
A Chen prime is a prime p such that p + 2 is either prime or a semiprime, meaning a product of exactly two primes. The concept is named after Chen Jingrun. So the number two steps above a Chen prime is never a number with three or more prime factors — it is either prime itself or the product of exactly two primes.
Is 41 a Chen prime?
Yes. To test 41, add 2, which gives 43. Since 43 is prime, the condition is satisfied: 41 + 2 is prime. That makes 41 a Chen prime. This is the simpler of the two allowed cases, where the number two above the prime is itself prime rather than a semiprime.
Is 43 a Chen prime?
No. Adding 2 to 43 gives 45, and 45 = 3 x 3 x 5. That factorization has three prime factors, so 45 is neither prime nor a semiprime. Because 43 + 2 fails both allowed cases, 43 does not qualify as a Chen prime, even though 43 itself is prime.
How many Chen primes are there up to 100?
There are 20 Chen primes up to 100. The largest of these is 89. So among the primes no greater than 100, twenty satisfy the Chen condition that the number two above them is either prime or a semiprime. The count of 20 and the largest value of 89 are the key facts for this range.
Is every twin prime a Chen prime?
The lower member of every twin prime pair is automatically a Chen prime, because its partner is prime and sits exactly two above it. However, the semiprime case adds many more Chen primes beyond the twin primes. So twin primes give a guaranteed subset, but the full set of Chen primes is larger.
Who proved there are infinitely many Chen primes?
Chen Jingrun proved there are infinitely many Chen primes in 1973. This result is regarded as a landmark on the road to the twin prime conjecture. It guarantees an infinite supply of primes p for which p + 2 is either prime or a semiprime, a weaker but still major step toward the twin prime question.