OFFSET
1,1
LINKS
PROG
(Python)
l=[0, 2, 1]
for n in range(3, 101):
x=l[n - 1] - (n - 1)
if x>0 and x not in l: l.append(x)
else: l.append(l[n - 1] + (n - 1))
print(l[1:]) # Indranil Ghosh, Jun 02 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 16 2001
EXTENSIONS
More terms from Sascha Kurz, Mar 24 2002
STATUS
approved