OFFSET
0,7
COMMENTS
A "bow" sequence. The bow sequences are a family of recursive sequences defined to have the flipped recursion from the Stern sequence A002487 (called bow for the opposite end of the boat from the stern). The bow sequences require two initial conditions: a(1)=alpha, a(2)=beta. We also define a(0)=0, although it does not enter into the recursion.
The bow sequences then follow the recursion a(2n) = a(n) + a(n+1) for n at least 2, and a(2n+1) = a(n). This particular bow sequence has initial conditions a(1)=0, a(2)=1 and (along with the sequence A106345 with initial conditions a(1)=1, a(2)=0) is of particular importance when studying the general bow sequences.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..25000
M. Dennison, A Sequence Related to the Stern Sequence, Ph.D. dissertation, University of Illinois at Urbana-Champaign, 2010.
Melissa Dennison, On Properties of the General Bow Sequence, J. Int. Seq., Vol. 22 (2019), Article 19.2.7.
EXAMPLE
a(3) = a(1) = 1, a(4) = a(2) + a(3) = 0 + 1 = 1, a(5) = a(2) = 0.
MAPLE
f:=proc(n) option remember;
if n=0 then 0
elif n=1 then 1
elif n=2 then 0
else
if n mod 2 = 0 then f(n/2)+f(1+n/2) else f((n-1)/2) fi;
fi;
end;
[seq(f(n), n=0..150)]; # N. J. A. Sloane, Apr 26 2017
MATHEMATICA
b[0]=0; b[1]=1; b[2]=0; b[n_?EvenQ]:=b[n]=b[n/2]+b[n/2+1]; b[n_?OddQ]:=b[n]=b[(n-1)/2]
CROSSREFS
KEYWORD
AUTHOR
Melissa Dennison, Apr 12 2017
EXTENSIONS
Edited by N. J. A. Sloane, Apr 26 2017
STATUS
approved