login
A225646
a(n) = lcm(n,p1,p2,...,pk) for such a partition of n which maximizes this value among all partitions {p1+p2+...pk} of n.
5
1, 1, 2, 6, 12, 30, 30, 84, 120, 180, 210, 330, 420, 780, 630, 840, 1680, 3570, 1386, 7980, 1980, 4620, 6930, 19320, 9240, 23100, 30030, 41580, 16380, 73080, 10920, 143220, 110880, 120120, 157080, 120120, 180180, 512820, 311220, 240240, 360360, 1231230, 180180
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