Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #5 May 26 2017 16:45:01
%S 1,1,1,2,1,2,1,2,2,3,2,3,2,3,2,4,1,3,1,3,2,4,2,5,2,5,2,5,2,4,3,5,4,7,
%T 2,3,3,7,1,4,1,2,3,6,2,5,1,5,2,5,2,7,2,6,2,7,2,4,5,7,5,10,2,7,2,7,2,7,
%U 4,9,4,8,7,11,3,6,7,9,3,4,4,5,4,5,4,7,7,9,3,7,1,3,5,7,3,8,1,7,2,7,2
%N a(0) = a(1) = 1; a(2*n) = a(n-a(n)), a(2*n+1) = a(n-a(n)) + a(n-a(n+1)).
%C A variation on Hofstadter's Q-sequence and Stern's diatomic sequence.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SternsDiatomicSeries.html">Stern's Diatomic Series</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HofstadtersQ-Sequence.html">Hofstadter's Q-Sequence</a>
%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>
%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>
%t a[0] = 1; a[1] = 1; a[n_] := If[EvenQ[n], a[n/2 - a[n/2]], a[(n - 1)/2 - a[(n - 1)/2]] + a[(n - 1)/2 - a[(n + 1)/2]]]; Table[a[n], {n, 0, 100}]
%Y Cf. A002487, A005185, A287475, A287477.
%K nonn
%O 0,4
%A _Ilya Gutkovskiy_, May 25 2017