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

10 Solutions

8 Solvers

Last Solution submitted on Jul 02, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...