ArticleslgStudy

science

Recamán's sequence

Recamán's sequence is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Recamán's sequence rather than just read about it. In short: In mathematics and computer science, Recamán's sequence is a sequence defined by a recurrence relation. Because its elements are related to the previous elements in a straightforward way, they are often defined using recursion.

Recamán's sequence — main illustration
Recamán's sequence — illustration

Key takeaways

  • Recamán's sequence belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Recamán's sequence to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Recamán's sequence from memory before moving on to harder problems.

Reference excerpt

In mathematics and computer science, Recamán's sequence is a sequence defined by a recurrence relation. Because its elements are related to the previous elements in a straightforward way, they are often defined using recursion.

Recamán's sequence was named after its inventor, Colombian mathematician Bernardo Recamán Santos, by Neil Sloane, creator of the On-Line Encyclopedia of Integer Sequences (OEIS).

Definition Recamán's sequence a 0 , a 1 , a 2 … {\displaystyle a_{0},a_{1},a_{2}\dots } is defined as:

a n = { 0 if n = 0 a n − 1 − n if a n − 1 − n > 0 and is not already in the sequence a n − 1 + n otherwise {\displaystyle a_{n}={\begin{cases}0&&{\text{if }}n=0\\a_{n-1}-n&&{\text{if }}a_{n-1}-n>0{\text{ and is not already in the sequence}}\\a_{n-1}+n&&{\text{otherwise}}\end{cases}}}

The first terms of the sequence are:

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, 17, 43, 16, 44, 15, 45, 14, 46, 79, 113, 78, 114, 77, 39, 78, 38, 79, 37, 80, 36, 81, 35, 82, 34, 83, 33, 84, 32, 85, 31, 86, 30, 87, 29, 88, 28, 89, 27, 90, 26, 91, 157, 224, 156, 225, 155, ... (sequence A005132 in the OEIS)

Visual representation

The most-common visualization of the Recamán's sequence is simply plotting its values, such as the figure seen here. On January 14, 2018, the Numberphile YouTube channel published a video titled "The Slightly Spooky Recamán Sequence", showing a visualization using alternating semi-circles, as it is shown in the figure at the top of this page.

Sound representation

Values of the sequence can be associated with musical notes, in such that the running of the sequence can be associated with an execution of a musical tune.

Properties The sequence satisfies:

a n ≥ 0 {\displaystyle a_{n}\geq 0}

| a n − a n − 1 | = n {\displaystyle |a_{n}-a_{n-1}|=n}

This is not a permutation of the integers: the first repeated term is 42 = a 24 = a 20 {\displaystyle 42=a_{24}=a_{20}} . Another one is 43 = a 18 = a 26 {\displaystyle 43=a_{18}=a_{26}} .

Conjecture Neil Sloane has conjectured that every number eventually appears, but this has not been proven. As of 2026, 10612 terms have been calculated, and 852,655 is the smallest natural number to not appear on the list.

Uses Besides its mathematical and aesthetic properties, Recamán's sequence can be used to secure 2D images by steganography.

References

External links OEIS sequence A005132 (Recamán's sequence) Weisstein, Eric W. "Recamán's Sequence". MathWorld. The Slightly Spooky Recamán Sequence. (June 14, 2018) Numberphile on YouTube The Recamán's sequence at Rosetta Code The Ultimate Guide to Recamán’s Sequence (visualization, sonification, and animation)

Illustrations

Recamán's sequence: A drawing of the first 75 terms of Recamán's sequence, according to the method of visualization shown in the Numberphile video "The Slightly Spooky Recamán Sequence"[3]
A drawing of the first 75 terms of Recamán's sequence, according to the method of visualization shown in the Numberphile video "The Slightly Spooky Recamán Sequence"[3]
Recamán's sequence: A plot for the first 100 terms of the Recamán's sequence[4]
A plot for the first 100 terms of the Recamán's sequence[4]
Recamán's sequence illustration

Worked examples

Example 1 — a first encounter with Recamán's sequence

Start with the simplest possible case. Write down what Recamán's sequence claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Recamán's sequence before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Recamán's sequence ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Recamán's sequence

In research
Recamán's sequence appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Recamán's sequence in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Recamán's sequence is common in secondary-school and first-year university syllabi. It links to neighbouring topics Integer sequences, Recurrence relations, Sequences and series, so understanding it makes those chapters shorter.
In everyday life
Look for Recamán's sequence outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Recamán's sequence in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Recamán's sequence means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Recamán's sequence out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Recamán's sequence in simple terms?

In mathematics and computer science, Recamán's sequence is a sequence defined by a recurrence relation. Because its elements are related to the previous elements in a straightforward way, they are often defined using recursion.

Why does Recamán's sequence matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Recamán's sequence?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Recamán's sequence.

Tags

  • Integer sequences
  • Recurrence relations
  • Sequences and series

Keep exploring