Recamán's sequence

Start at 0. On step n, jump back n if that lands on a number above 0 you haven't visited; otherwise jump forward n. That gives 0, 1, 3, 6, 2, 7, 13, 20, 12, 21, 11, … Draw each jump as a half circle and the arcs weave a pattern. Does the walk land on every number eventually? Nobody knows.

The walk

Any whole number up to 999,999,999. The browser walks up to 10 million steps to find it.

Back when it can, forward when it can't. Type a number to see when the walk first lands on it.

The numbers it skips

Each square is a number from 0 to 1,999, filled in when the walk first lands on it and shaded by how many steps that took. The empty ones haven't been reached yet. Point at one to see it, and tap it to look it up.

The walk speeds up tenfold every second. Watch which squares stay empty.

  • Up to 10 steps
  • Up to 100
  • Up to 1,000
  • Up to 10,000
  • Up to 100,000
  • Up to 1,000,000

19 is a famous holdout: it isn't reached until step 99,734.

The numbers that hold out

Most small numbers turn up fast, but a few are skipped for ages. 19 isn't reached until step 99,734. Once it is, the smallest number still missing jumps to 61, which waits until step 181,653; then 879, until step 328,002; then 1,355. Your browser can walk 10 million steps, and 1,355 is still missing at the end, along with 1,643 and 1,814 below 2,000.

1,355 does turn up eventually, at step 325,374,625,245. In 2001 Allan Wilks walked 1015 steps: every number below 852,655 had appeared, but not 852,655 itself. Benjamin Chaffin has since pushed past 10612 steps, and 852,655 is still missing.

Bernardo Recamán Santos sent the sequence to Neil Sloane in a letter in 1991, and Sloane conjectured that every number eventually appears. In 2017 he added that he's no longer so sure. The walk can land on a number twice, too: 42 is the first, reached at step 20 and again at step 24.