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