Determine whether a number is a Higgs prime - MATLAB Cody - MATLAB Central

Problem 59050. Determine whether a number is a Higgs prime

Difficulty:Rate
If the sequence a lists the Higgs primes, then a_{n+1} is the smallest prime greater than a_n such that a_{n+1}-1 divides the product (a1*a2*a3*...*a_n)^2. The first four Higgs primes are 2, 3, 5, and 7. Therefore, the next one is 11 because 11-1 = 10 divides (2*3*5*7)^2 = 44,100.
Write a function to determine whether a number is a Higgs prime.

Solution Stats

14.71% Correct | 85.29% Incorrect
Last Solution submitted on Jul 26, 2024

Problem Comments

Solution Comments

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

Problem Recent Solvers5

Suggested Problems

More from this Author289

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