레카 만의 사본
Recamán의 시퀀스 는 다음과 같이 정의됩니다. an=⎧⎩⎨0if n = 0an−1−nif an−1−n>0 and is not already in the sequence,an−1+notherwisean={0if n = 0an−1−nif an−1−n>0 and is not already in the sequence,an−1+notherwisea_n=\begin{cases}0\quad\quad\quad\quad\text{if n = 0}\\a_{n-1}-n\quad\text{if }a_{n-1}-n>0\text{ and is not already in the sequence,}\\a_{n-1}+n\quad\text{otherwise}\end{cases} 또는 의사 코드로 : a(0) = 0, if (a(n - …