is it correct for 35197? Im getting 5001 instead of inf.
I also get 5001.
10016 and 10081 have another valid answer: 1251 (besides 626). The problem should accept them or request the minimum exponent.
Create a vector whose elements depend on the previous element
398 Solvers
Circular Primes (based on Project Euler, problem 35)
145 Solvers
191 Solvers
144 Solvers
With apologies to William Blake
34 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!