This site is supported by donations to The OEIS Foundation.

# Recamán's sequence

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)