Juggler sequence: Difference between revisions

Corrected error in task description, see talk page.
(Ada version)
(Corrected error in task description, see talk page.)
Line 9:
A [https://en.wikipedia.org/wiki/Juggler_sequence juggler sequence] is an integer sequence that starts with a positive integer a[0], with each subsequent term in the sequence being defined by the recurrence relation:
 
<big> a[k + 1] = floor(a[k] ^ 0.5) if a[k] is even <big> ''' ''or'' ''' </big> </big>
<big> a[k + 1] = floor(a[k] ^ 1.5) if a[k] is odd </big>
 
If a juggler sequence reaches 1, then all subsequent terms are equal to 1. This is known to be the case for initial terms up to 1,000,000 but it is not known whether all juggler sequences after that will eventually reach 1.
9,485

edits