Problem 60764. Determine whether a number is a Ludic prime

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

100.0% Correct | 0.0% Incorrect
Last Solution submitted on Nov 25, 2024

Solution Comments

Show comments

Problem Recent Solvers3

Suggested Problems

More from this Author281

Problem Tags

Community Treasure Hunt

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

Start Hunting!