OFFSET
0,1
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
FORMULA
MAPLE
MATHEMATICA
f[s_List] := Module[{a = s[[-1]], n = Length[s]}, Append[s, If[a > n && FreeQ[s, a - n], a - n, a + n]]];
Nest[f, {0}, 100] // Differences // Sign (* Jean-François Alcover, Apr 19 2020, using Robert G. Wilson v's code for A005132 *)
CROSSREFS
KEYWORD
sign
AUTHOR
M. F. Hasler, Jun 03 2009
EXTENSIONS
a(0)=1 added by N. J. A. Sloane, May 01 2020
STATUS
approved