OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..803
MATHEMATICA
a[n_] := a[n] = If[n <= 2, 1, a[a[n - 1]] + a[n - a[n - 1]]]; With[{nn = 500}, Function[s, Select[Range@ nn, a@ # == s[[#]] &]]@ Table[BitXor[a[#], a[n - #]] &@ a[n - 1] + Boole[n <= 2], {n, nn}]] (* Michael De Vlieger, Mar 18 2017, after Robert G. Wilson v at A004001 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 18 2017
STATUS
approved