login
A085198
Function whose restriction to A014486 gives A071156.
3
0, 0, 1, 0, 5, 0, 1, 0, 23, 2, 3, -1, 5, 0, 1, 0, 119, 14, 15, -1, 17, 0, 1, -2, 23, 2, 3, -1, 5, 0, 1, 0, 719, 86, 87, 5, 89, 6, 7, -4, 95, 8, 9, -3, 11, -2, -1, -3, 119, 14, 15, -1, 17, 0, 1, -2, 23, 2, 3, -1, 5, 0, 1, 0, 5039, 566, 567, 53, 569, 54, 55, -4, 575, 56, 57, -3, 59, -2, -1, -7, 599, 62, 63, -1, 65, 0, 1, -6, 71, 2, 3, -5, 5, -4, -3
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
A071156(n) = a(A014486(n)).
Sequence in context: A060338 A132795 A277031 * A339207 A372959 A199916
KEYWORD
sign,base
AUTHOR
Antti Karttunen, Jun 14 2003
STATUS
approved