login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I

%S 1,1,2,6,12,30,30,84,120,180,210,330,420,780,630,840,1680,3570,1386,

%T 7980,1980,4620,6930,19320,9240,23100,30030,41580,16380,73080,10920,

%U 143220,110880,120120,157080,120120,180180,512820,311220,240240,360360,1231230,180180

%N 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.

%C Second row of table A225640.

%C a(0)=1 by convention.

%H <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>

%o (Scheme):

%o (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)))

%o (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))))))))

%Y Cf. A225640, A225642, A225652, A000793, A225655.

%K nonn

%O 0,3

%A _Antti Karttunen_, May 15 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 20 16:15 EDT 2019. Contains 325185 sequences. (Running on oeis4.)