Circular Primes (based on Project Euler, problem 35) - MATLAB Cody - MATLAB Central

Problem 1095. Circular Primes (based on Project Euler, problem 35)

Difficulty:Rate

The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.

There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97.

Given a number x, write a MATLAB script that will tell you the number of circular primes less than or equal to x as well as a sorted list of what the circular prime numbers are.

Solution Stats

33.18% Correct | 66.82% Incorrect
Last Solution submitted on May 06, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
2
4
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers572

Community Treasure Hunt

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

Start Hunting!
Go to top of page