login
A287601
a(0) = a(1) = 1; a(2*n) = n - a(a(n)), a(2*n+1) = a(a(n)) + a(n-a(n)).
0
1, 1, 0, 2, 1, 1, 3, 1, 3, 3, 4, 2, 4, 4, 6, 4, 6, 3, 7, 5, 9, 4, 11, 3, 11, 4, 12, 4, 11, 6, 14, 3, 13, 7, 15, 8, 17, 3, 18, 7, 17, 5, 20, 4, 20, 4, 21, 11, 22, 6, 24, 5, 22, 10, 26, 4, 26, 5, 26, 6, 24, 12, 29, 13, 28, 9, 32, 13, 30, 9, 32, 7, 33, 8, 35, 17, 31, 16, 38, 14, 37, 6, 40, 18, 33, 20
OFFSET
0,4
COMMENTS
A variation on Hofstadter's G-sequence and Hofstadter-Conway $10000 sequence.
LINKS
MATHEMATICA
a[0] = 1; a[1] = 1; a[n_] := If[EvenQ[n], n/2 - a[a[n/2]], a[a[(n - 1)/2]] + a[(n - 1)/2 - a[(n - 1)/2]]]; Table[a[n], {n, 0, 85}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 27 2017
STATUS
approved