login
A085144
a(0)=0, a(2n) = a(n)+1, a(2n+1) = -a(n).
5
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, 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, 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
OFFSET
0,5
COMMENTS
Local maxima are a(2^k) = k, minima are a(2^k+1) = -k+1.
LINKS
PROG
(Haskell)
import Data.List (transpose)
a085144 n = a085144_list !! n
a085144_list = 0 : concat
(transpose [map negate a085144_list, map (+ 1) $ tail a085144_list])
-- Reinhard Zumkeller, Mar 18 2015
CROSSREFS
Zeros are in A085145. Cf. A004718, A010060, A059448.
Sequence in context: A029352 A340011 A055168 * A156578 A171846 A375536
KEYWORD
sign,easy
AUTHOR
Ralf Stephan, Jun 20 2003
STATUS
approved