Identify full reptend primes - MATLAB Cody - MATLAB Central

Problem 46099. Identify full reptend primes

Difficulty:Rate
Cody Problem 273, which is based on Project Euler Problem 26, introduced me to full reptend primes. If p is a full reptend prime, then 1/p has a period of p-1. That is, the decimal expansion of 1/p has strings of p-1 digits that repeat. The first five full reptend primes are 7, 17, 19, 23, and 29.
Write a function that determines whether the input is a full reptend prime.

Solution Stats

20.31% Correct | 79.69% Incorrect
Last Solution submitted on Sep 08, 2024

Solution Comments

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

Problem Recent Solvers13

Suggested Problems

More from this Author291

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page