migrated recursive/multiple arg lcm solution from #005 to lib