Skip to main content
2 of 2
deleted 167 characters in body
ar4093
  • 611
  • 3
  • 7

Pyth, 24 15 bytes

eSm.U/*bZibZd./

Try it online!

             ./Q  # List of partitions of the input
  m               # map that over lambda d:
   .U       d     # reduce d (with starting value first element of the list) on lambda b,Z:
     /*bZgbZ      # (b * Z) / GCD(b, Z)
 S                # this gives the list of lcms of all partitions. Sort this
e                 # and take the last element (maximum)

-9 bytes: paid attention and noticed that Pyth actually has a GCD builtin (i).

ar4093
  • 611
  • 3
  • 7