OFFSET
0,3
COMMENTS
Second row of table A225640.
a(0)=1 by convention.
PROG
(Scheme):
(define (A225646 n) (let ((maxlcm (list 1))) (fold_over_partitions_of n n lcm (lambda (p) (set-car! maxlcm (max (car maxlcm) p)))) (car maxlcm)))
(define (fold_over_partitions_of m initval addpartfun colfun) (let recurse ((m m) (b m) (n 0) (partition initval)) (cond ((zero? m) (colfun partition)) (else (let loop ((i 1)) (recurse (- m i) i (+ 1 n) (addpartfun i partition)) (if (< i (min b m)) (loop (+ 1 i))))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 15 2013
STATUS
approved