OFFSET
0,4
COMMENTS
In this array the maximization of LCM starts from partition {k} of k, instead of partition {1+1+...+1} as in A225630.
EXAMPLE
The top-left corner of the array:
1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
1, 1, 2, 6, 12, 30, 30, 84, 120, 180, 210, 330, 420, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 1260, 840, 4620, 4620, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 13860, 13860, ...
1, 1, 2, 6, 12, 60, 60, 420, 840, 2520, 2520, 27720, 27720, ...
...
PROG
(Scheme):
(define (A225640bi col row) (let ((maxlcm (list 0))) (let loop ((prevmaxlcm (max 1 col)) (stepsleft row)) (if (zero? stepsleft) prevmaxlcm (begin (gen_partitions col (lambda (p) (set-car! maxlcm (max (car maxlcm) (apply lcm (cons prevmaxlcm p)))))) (loop (car maxlcm) (- stepsleft 1)))))))
(define (gen_partitions m colfun) (let recurse ((m m) (b m) (n 0) (partition (list))) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (cons i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, May 14 2013
STATUS
approved