Recamán's sequence is defined recursively: \(a(0) = 0\), and for \(n \geq 1\),
\(a(n) = \begin{cases} a(n-1) - n & \text{if } a(n-1) - n > 0 \text{ and not already in the sequence} \\ a(n-1) + n & \text{otherwise} \end{cases}\)
The first terms: 0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62, 42, 63, 41, 18, 42, ...
It's named after Colombian mathematician Bernardo Recamán Santos, who published it in 1991. The sequence is visually striking — plotting each term as a semicircle arc creates a beautiful spiral pattern that became the basis for a Numberphile video and a piano composition.
A major open problem: does every positive integer appear in the sequence? It's been verified up to enormous bounds (roughly 10²³) but no proof exists. The first few integers known to not yet appear in the early sequence are slowly being checked off as more terms are computed.