Recamán Sequence Calculator

Back if new, forward otherwise

CalculatorsFreeNo Signup
4.8(261 reviews)
All Tools

Loading tool...

About Recamán Sequence Calculator

A Recamán sequence calculator generating a(n): if a(n-1)−n is positive and not yet in the sequence, a(n) = a(n-1)−n; otherwise a(n) = a(n-1)+n. Start a(0)=0. Produces an unpredictable, non-monotonic sequence. Client-side.

Recamán Sequence Calculator Features

  • Sequence generation
  • Visited tracking
  • Step direction
  • Visualization
  • Music connection
Recamán's sequence (A005132): a(0)=0. At step n: try a(n-1)−n. If positive and new, use it. Otherwise use a(n-1)+n. Result: 0,1,3,6,2,7,13,20,12,21,11,22,10,23,9,24,8,25... Beautifully unpredictable. Open question: does every positive integer eventually appear?

How to Use

Enter number of terms:

  • Sequence: Generated terms
  • Steps: Back or forward
  • Missing: Numbers not yet hit

The Mystery

Conjecture: every positive integer appears eventually. Verified up to ~10^15 terms. The first number NOT to appear (as of term 10^15) varies. The sequence oscillates wildly — sometimes low, sometimes very high.

Musical Connection

The sequence has been turned into music (each value → a note frequency). It produces hauntingly beautiful, almost organic-sounding melodies. Featured in Numberphile videos and mathematical art installations.

Step-by-Step Instructions

  1. 1Enter terms count.
  2. 2Generate sequence.
  3. 3Track visited.
  4. 4See directions.
  5. 5Find missing.

Recamán Sequence Calculator — Frequently Asked Questions

Does every number eventually appear?+

Unknown! This is the main open conjecture. Computer searches have verified it for extremely large numbers of terms, but no proof exists. Some numbers take an incredibly long time to first appear — number 852655 first shows up only after millions of steps.

Why is it called 'Recamán'?+

Named after Colombian mathematician Bernardo Recamán Santos, who proposed it in the 1990s. It became sequence A005132 in the OEIS and gained fame through Numberphile and mathematical art.

What makes this sequence special?+

Its simplicity (just add or subtract n) produces incredibly complex, unpredictable behavior. It's deterministic but looks random. The visualization (arcs connecting consecutive terms) creates beautiful, intricate patterns.

Share this tool: