Problem 60787. List the first of three consecutive square-free numbers
The numbers 13, 14, and 15 are consecutive, of course, but they also share the property of being square-free. That is, each number has no prime factors that are repeated. Another group of three consecutive square-free numbers is 129, 130, and 131, and a bit of thought will show that the longest string of square-free numbers is three.
Write a function that returns the nth number in the sequence of the first numbers in these triples. Regarding the examples above, 13 and 129 are the third and nineteenth elements of the sequence.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers4
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!