Recaman's sequence: Difference between revisions

m
Removed inbalanced parenthesis in uBasic/4tH
m (Removes superfluous "=1" comparision in uBasic/4tH)
m (Removed inbalanced parenthesis in uBasic/4tH)
Line 2,266:
If i<16 Then Print a, ' print first 15 numbers
b = Iif ((a-i<1) + (Func(_Peek(Max(0, a-i)))), a+i, a-i)
If Func(_Peek(b))) Then Print "\nFirst repetition: ";b : Break
Proc _Set(Set(a, b)) ' set bit in bitmap
Next
374

edits