Problem 58498. Compute the Sisyphus sequence
Solution Stats
Problem Comments
-
5 Comments
I see now--because a(2)=3 you add p=5 instead of p=3, and then go back and use p=3 the next time. It seems like this is the only time this happens--from then on the next largest unused prime is always the next prime.
I still don't get why 3 is not "unused" in the alternate form on the second climb but is later on the third; it implies that it was "de-used". Is it that your step up can't be a doubling?
Yes, the flag only affects the addition of 3 and 5. After the two is used and a_n < the first prime, adding that prime produces an even number less than twice that prime. Half it, and it's smaller than that prime, hence smaller than the next prime as well. first four steps,
Solution Comments
Show commentsGroup

Easy Sequences Volume II
- 10 Problems
- 5 Finishers
- Easy Sequences 13: Average Speed of Spaceship
- Easy Sequences 16: Volume of Embedded Octahedron
- Easy Sequences 18: Set Bits of Triple Summations
- Easy Sequences 21: Combinatorial Summations
- Easy Sequences 23: Hat Guessing Game!
- Easy Sequences 24: Number of Coprime Lattice Points
- Easy Sequences 25: Product of Series
- Easy Sequences 31: N-N's Sequence
- Easy Sequences 27: Product of Radicals of Integers
- Easy Sequences 28: Sum of Radicals of Integers
Problem Recent Solvers6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!