login
a(0)=0, a(2n) = a(n)+1, a(2n+1) = -a(n).
5

%I #5 Mar 18 2015 16:57:08

%S 0,0,1,0,2,-1,1,0,3,-2,0,1,2,-1,1,0,4,-3,-1,2,1,0,2,-1,3,-2,0,1,2,-1,

%T 1,0,5,-4,-2,3,0,1,3,-2,2,-1,1,0,3,-2,0,1,4,-3,-1,2,1,0,2,-1,3,-2,0,1,

%U 2,-1,1,0,6,-5,-3,4,-1,2,4,-3,1,0,2,-1,4,-3,-1,2,3,-2,0,1,2

%N a(0)=0, a(2n) = a(n)+1, a(2n+1) = -a(n).

%C Local maxima are a(2^k) = k, minima are a(2^k+1) = -k+1.

%H Reinhard Zumkeller, <a href="/A085144/b085144.txt">Table of n, a(n) for n = 0..10000</a>

%o (Haskell)

%o import Data.List (transpose)

%o a085144 n = a085144_list !! n

%o a085144_list = 0 : concat

%o (transpose [map negate a085144_list, map (+ 1) $ tail a085144_list])

%o -- _Reinhard Zumkeller_, Mar 18 2015

%Y Zeros are in A085145. Cf. A004718, A010060, A059448.

%K sign,easy

%O 0,5

%A _Ralf Stephan_, Jun 20 2003