## What is a Recamán sequence?

There are **two different sequences** attributed to Columbian puzzle maker Bernardo Recamán Santos:

**Recamán sequence #1** (entry A5132 in the OEIS) is usually the one referred to as “The” Recamán Sequence. It is defined by [1]:

- a
_{n}= a_{n-1}– n, if a_{n-1}– n > 0*and*a_{n-1}has already occurred in the sequence. - Otherwise, a
_{n}= a_{n-1}+ n.

The first few numbers are:

**{1, 3, 6, 2, 7, 13, 20, …}.**

**Recamán sequence #2** (entry A8336 in the OEIS) is defined by:

- a
_{n+1}= a_{n}/ n if n divides a_{n}

The first few numbers are:

**{1, 1, 2, 6, 24, 120, …}.**

## Intuitive way to Create the Terms of the Recamán Sequence

Neil Sloane of ATT Labs (creator of OEIS) shed a little light on how the sequence is created in a 2008 Math Factor podcast [2].

Step 1: Write down the numbers

1 2 3 4 5 6 7 8 9

with gaps (we’re going to write the terms in those gaps).

Step 2: Write down the first term, which is 1, between the 1 and the 2:

1 (1) 2 3 4 5 6 7 8 9.

Step 2: Calculate the second term.

Ask yourself the question: Can we subtract 2 (the second number in our list) from 1 (the first term)?. We can’t (negative numbers or zero are not allowed), so we have to add 2 instead. 2 + 1 = 3, so:

1 (1) 2 (3) 3 4 5 6 7 8 9.

Step 2: Calculate the third term in the same way.

Ask yourself the question: Can we subtract 3 (the third number in our list from 3 (the second term). We can’t, so we have to add: 3 + 3 = 6, so:

1 (1) 2 (3) 3 (6) 4 5 6 7 8 9.

Continue in this way, obeying the basic rules:

**Numbers can’t be zero, negative, or something already in the sequence.**

If any of these conditions appear, just add instead of subtract. Note that if you add and get a number that has appeared before, that’s OK. It’s only not allowed if you subtract.

## Deciphering Recaman’s sequence

Although 10^{230} terms of Recaman’s sequence have been computed, but it still remains a mystery [2] despite the OEIS’s calculation of an enormous number of terms. No one knows if every number will eventually appear; Those dedicated to deciphering the sequence have dubbed it “How to Recamán’s life” [3].

As of the January 2018, Prime Curious! reported that the smallest missing prime in the Sequence is 966727 (as of January 2018).

## References

[1] Ding, C. (2012). Sequences and Their Applications. Springer London.

[2] Math Factor Podcast. Retrieved April 9, 2021 from: http://mathfactor.uark.edu/2008/05/dw-the-online-encyclopedia-of-integer-sequences/

[2] Myers, J. et al. (2020). Three Cousins of Recaman’s Sequence. Retrieved April 9, 2021 from: https://ui.adsabs.harvard.edu/abs/2020arXiv200414000M/abstract

[3] Roberts, S. (2015). Genius At Play: The Curious Mind of John Horton Conway. Bloomsbury Publishing.

**CITE THIS AS:**

**Stephanie Glen**. "Recamán Sequence: Definition & Creating Terms" From

**CalculusHowTo.com**: Calculus for the rest of us! https://www.calculushowto.com/recaman-sequence-definition/

**Need help with a homework or test question? **With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!