0,5

A variation on Hofstadter's G-sequence and Stern's diatomic sequence.

Table of n, a(n) for n=0..85.

Eric Weisstein's World of Mathematics, Stern's Diatomic Series

Eric Weisstein's World of Mathematics, Hofstadter G-Sequence

Index entries for sequences related to Stern's sequences

Index entries for Hofstadter-type sequences

a(2*n) + a(2*n+1) + a(2*n+2) = 2*n + 1 (from definition).

a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], n/2 - a[a[n/2]], a[a[(n - 1)/2]] + a[a[(n + 1)/2]]]; Table[a[n], {n, 0, 85}]

Cf. A002487, A005206, A046698, A287475, A287476, A287477.

Sequence in context: A274451 A193787 A072614 * A238552 A257523 A067044

Adjacent sequences: A287594 A287595 A287596 * A287598 A287599 A287600

nonn

Ilya Gutkovskiy, May 27 2017

approved