OFFSET
0,5
PROG
(MIT/GNU Scheme) (define (A085198 n) (let loop ((n n) (s 0) (h 1) (i 2) (fi 1)) (cond ((zero? n) s) ((odd? n) (loop (/ (-1+ n) 2) s (-1+ h) i fi)) (else (loop (/ n 2) (+ s (* h fi)) (1+ h) (1+ i) (* fi i))))))
CROSSREFS
KEYWORD
sign,base
AUTHOR
Antti Karttunen, Jun 14 2003
STATUS
approved