OFFSET
1,2
COMMENTS
The Recamán transform of a sequence {b(n), n>0} is the sequence {r(n), n>=0} defined as follows: r(0) = 0; for n > 0, r(n) = r(n-1) - b(n) if nonnegative and not already in the sequence, otherwise r(n) = r(n-1) + b(n).
The Recamán transform of this sequence corresponds to A118201.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Pinplot of (n, a(n)-n) for n = 1..100000
Rémy Sigrist, PARI program for A335280
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 30 2020
STATUS
approved