Hofstadter Figure-Figure sequences: Difference between revisions

Content added Content deleted
m (→‎{{header|PL/I}}: correct lang tags)
Line 2,004: Line 2,004:
index = s(n-1)+1
index = s(n-1)+1
Do
Do
'Add to s if current index is neither in r or s.
'Add to s if the current index is not in the r array.
If r.IndexOf(index,0) = -1 And s.IndexOf(index,0) = -1 Then
If r.IndexOf(index,0) = -1 Then
s.Add index
s.Add index
Exit Do
Exit Do