Recamán's sequence
In mathematics and computer science, Recamán's sequence is a well known 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, by Neil Sloane, creator of the On-Line Encyclopedia of Integer Sequences.
Definition
Recamán's sequence is defined as:The first terms of the sequence are:
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 top of this page.
Sound representation
Values of the sequence can be associated with musical notes, in such that case the running of the sequence can be associated with an execution of a musical tune.Properties
The sequence satisfies:This is not a permutation of the integers: the first repeated term is. Another one is.