login
A342682
a(1) = 1; for n > 0: a(2*n) = -a(n+1), a(2*n+1) = a(n) + a(n+1).
1
1, 0, 1, -1, 1, 1, 0, -1, 0, -1, 2, 0, 1, 1, -1, 0, -1, 1, -1, -2, 1, 0, 2, -1, 1, -1, 2, 1, 0, 0, -1, 1, -1, -1, 0, 1, 0, 2, -3, -1, -1, 0, 1, -2, 2, 1, 1, -1, 0, 1, 0, -2, 1, -1, 3, 0, 1, 0, 0, 1, -1, -1, 0, 1, 0, 1, -2, 0, -1, -1, 1, 0, 1, -2, 2, 3, -1, 1, -4
OFFSET
1,11
LINKS
George Beck and Karl Dilcher, A Matrix Related to Stern Polynomials and the Prouhet-Thue-Morse Sequence, arXiv:2106.10400 [math.CO], 2021.
EXAMPLE
a(2) = -a(2), so a(2) = 0; a(11) = a(5) + a(6) = 1 + 1 = 2.
MATHEMATICA
a@1 = 1;
a@2 = 0;
a@n_ := -a[n/2 + 1] /; EvenQ@n;
a@n_ := a[1/2 (n - 1)] + a[1/2 (n - 1) + 1] /; OddQ@n;
a /@ Range[128]
CROSSREFS
KEYWORD
sign
AUTHOR
George Beck, May 18 2021
STATUS
approved