OFFSET
0,4
COMMENTS
This is otherwise like A085215, except that to each digit in the factorial expansion of 'x' is added the most significant digit in the factorial expansion of 'y'.
EXAMPLE
To get A(4,3) = 81 we take the factorial expansions of 4 (= '20') and 3 (= '11') and then we add 1 to each digit of the former to get '31', before concatenating them as '3111' (3*24+1*6+1*2+1*1 = 81). Similarly, for A(3,4) = 94 we add 2 to 3's expansion '11' to get '33' and then the concatenation yields '3320' (3*24+3*6+2*2=94). See A085221 for the corresponding factorial expansions.
PROG
(MIT/GNU Scheme) (define (A085219bi x y) (let loop ((x x) (y y) (i 2) (j (1+ (A084558 y))) (r (car (n->factbase y)))) (cond ((zero? x) y) (else (loop (floor->exact (/ x i)) (+ (* (A000142 j) (+ r (modulo x i))) y) (1+ i) (1+ j) r)))))
(define (n->factbase n) (let loop ((n n) (fex (if (zero? n) (list 0) (list))) (i 2)) (cond ((zero? n) fex) (else (loop (floor->exact (/ n i)) (cons (modulo n i) fex) (1+ i))))))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jun 23 2003
STATUS
approved