OFFSET
0,4
COMMENTS
A variation on Hofstadter's Q-sequence and Stern's diatomic sequence.
LINKS
Eric Weisstein's World of Mathematics, Stern's Diatomic Series
Eric Weisstein's World of Mathematics, Hofstadter's Q-Sequence
MATHEMATICA
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, May 25 2017
STATUS
approved