OFFSET
0,6
COMMENTS
A variation on Hofstadter's Q-sequence and Stern's diatomic sequence.
LINKS
Michael Gilleland, Some Self-Similar Integer Sequences
Eric Weisstein's World of Mathematics, Stern's Diatomic Series
Eric Weisstein's World of Mathematics, Hofstadter's Q-Sequence
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], 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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 25 2017
STATUS
approved