This site is supported by donations to The OEIS Foundation.

Recamán's sequence

From OeisWiki

Jump to: navigation, search

This article page is a stub, please help by expanding it.



Recamán's sequence is a sequence which by definition (...not already in the sequence, ...) is an injection (one-to-one) into the set of nonnegative integers. N. J. A. Sloane conjectures that it is also a surjection (onto) the set of nonnegative integers, and the sequence is thus a permutation of the nonnegative integers.

A005132 Recamán's sequence: \scriptstyle a(0) \,=\, 0; \, for \scriptstyle n \,>\, 0,\, a(n) \,=\, a(n-1) \,-\, n \, if that number is positive and not already in the sequence, otherwise \scriptstyle a(n) \,=\, a(n-1) \,+\, n \,. (look at the graphs)

{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, ...}
Personal tools