cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 15 2013

Keywords

Comments

Second row of table A225640.
a(0)=1 by convention.

Crossrefs

Programs

  • 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))))))))