login
A071413
a(n) = if n=0 then 0 else a(floor(n/2))+n*(-1)^(n mod 2).
1
0, -1, 1, -4, 5, -4, 2, -11, 13, -4, 6, -15, 14, -11, 3, -26, 29, -4, 14, -23, 26, -15, 7, -38, 38, -11, 15, -38, 31, -26, 4, -57, 61, -4, 30, -39, 50, -23, 15, -62, 66, -15, 27, -58, 51, -38, 8, -85, 86, -11, 39, -62, 67, -38, 16, -93, 87, -26, 32, -85, 64, -57, 5
OFFSET
0,4
PROG
(Haskell)
a071413 0 = 0
a071413 n | m == 0 = a071413 n' + n
| otherwise = a071413 n' - n where (n', m) = divMod n 2
-- Reinhard Zumkeller, Jun 01 2013
CROSSREFS
Cf. A005187.
Sequence in context: A011427 A366610 A175622 * A161811 A016717 A366153
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Jun 24 2000
STATUS
approved