7 kyu
link to kata
my solution
Return the n
th term of the Recamán's sequence.
a(0) = 0;
a(n-1) - n, if this value is positive and not yet in the sequence /
a(n) <
a(n-1) + n, otherwise
input range: 0 – 30 000
Numberphile video about Recamán's sequence