OFFSET
0,3
LINKS
PROG
(define (packA001477 x y) (/ (+ (expt (+ x y) 2) x (* 3 y)) 2))
(define (packA072735 x y) (cond ((<= x y) (let ((half-x (floor->exact (/ x 2)))) (packA001477 half-x (+ half-x (* 2 (- y (* 2 half-x))) (modulo x 2) (if (and (eq? x y) (even? x)) 0 -1))))) (else (let ((half-y (floor->exact (/ y 2)))) (packA001477 (+ half-y (* 2 (- (-1+ x) (* 2 half-y))) (modulo y 2) (if (and (eq? x (1+ y)) (even? y)) 1 0)) half-y)))))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jun 12 2002
STATUS
approved