OFFSET
0,6
COMMENTS
The same sequence arises for any integer value r > 1 + floor(log_2(n)).
The maximum value of a(n) between n=2^k and n=2^(k+1) is the k-th term of A023619.
FORMULA
MATHEMATICA
s[0] = 0; s[1] = 1; s[n_?EvenQ] := s[n] = s[n/2]; s[n_?OddQ] := s[n] = s[(n + 1)/2] + s[(n - 1)/2];
a[0]=-1; a[1]=-1; a[n_?EvenQ] := a[n] = a[n/2]+s[n/2]; a[n_?OddQ] := a[n] = s[(n + 1)/2] + s[(n - 1)/2]+a[(n + 1)/2] + a[(n - 1)/2]
CROSSREFS
KEYWORD
sign
AUTHOR
Aubrey Laskowski, Oct 28 2018
STATUS
approved