def carmichael_of_factorized(f_list):
 if (len(f_list) < 1):
  return 1
 result = carmichael_of_ppower(f_list[0])
 for i in range(1, len(f_list)):
  result = lcm(result, carmichael_of_ppower(f_list[i]))
 return result

def carmichael_of_factorized ( f_list ) : if ( len ( f_list ) < 1 ) : return 1 result = carmichael_of_ppower ( f_list [ 0 ] ) for i in range ( 1 , len ( f_list ) ) : result = lcm ( result , carmichael_of_ppower ( f_list [ i ] ) ) return result
return the carmichael function of a number that is represented as a list of pairs .