List the semiprimes - MATLAB Cody - MATLAB Central

Problem 55275. List the semiprimes

Difficulty:Rate
A semiprime number—or a 2-almost prime—is the product of two prime numbers. The numbers 6 = 2x3 and 9 = 3x3 are semiprimes, but 8 = 2x2x2 and 30 = 2x3x5 are not. The semiprimes appear in three of Ramon Villamangca’s “Easy Sequences”: Cody Problems 52859, 52990, and 53740.
Write a function to list the semiprime numbers less than or equal to the input number.

Solution Stats

35.56% Correct | 64.44% Incorrect
Last Solution submitted on Dec 18, 2024

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
13
5

Problem Recent Solvers13

Suggested Problems

More from this Author290

Community Treasure Hunt

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

Start Hunting!
Go to top of page