A Chen prime is a prime number p such that p+2 is either prime or semiprime. The number 17 is a Chen prime because 17+2 = 19 is a prime number, and the number 37 is a Chen prime because 37+2 = 39 = 3x13 is a semiprime.
Write a function to list Chen primes less than or equal to the input number

Solution Stats

3 Solutions

2 Solvers

Last Solution submitted on May 30, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers2

Suggested Problems

More from this Author325

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!