Miskatonic University Press

Recamán's Sequence

mathematics

Thanks to the Neil Sloane episode of the Numberphile podcast, I learned about Recamán’s sequence (look for the “listen” link and fool around with that):

a(0) = 0;

for n > 0,

a(n) = a(n-1) - n if nonnegative and not already in the sequence,

otherwise a(n) = a(n-1) + n.

The first twenty numbers in the sequence are: 0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, 22, 10, 23, 9, 24, 8, 25, 43, 62.

In the comments, Neil Sloane said, “I conjecture that every number eventually appears.” But then in 2017 he added: “That was written in 1991. Today I’m not so sure that every number appears.”

As of 2018, 10^230 terms have been calculated, but 852655 has not yet shown up.

The Slightly Spooky Recamán Sequence video with Alex Bellos has some great visuals.