Ludic numbers are formed by a sieve. Start with a list of the positive integers. Skip 1 and start with 2. Then delete every second number after 2 (i.e., 4, 6, 8, 10, etc.). Then move to the next number after 2—i.e., 3—and delete every third number (9, 15, 21, etc.). The next number is 5, so delete every fifth number (19, 37, etc.). Unlike the Sieve of Eratosthenes, this remaining numbers are not all prime.
Write a function to determine whether a number is a Ludic prime. The function should return three logical variables that answer these questions: Is it a Ludic prime? Is it a Ludic number? Is it prime?

Solution Stats

10 Solutions

8 Solvers

Last Solution submitted on Jun 06, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers8

Suggested Problems

More from this Author325

Problem Tags

Community Treasure Hunt

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

Start Hunting!