OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
MATHEMATICA
a[n_] := a[n] = Which[n < 2, Boole[n == 1] - Boole[n == 0], OddQ[n], Abs[a[n - 1] - a[n - 2]], True, a[n/2] + a[n/2 - 1]]; s = Array[a[#] &, 4200]; Array[FirstPosition[s, #][[1]] &, LengthWhile[Differences@ Union@ s, # == 1 &]] (* Michael De Vlieger, Feb 18 2022, after Michael Somos at A020944 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Seiichi Manyama, Feb 18 2022
STATUS
approved