def carmichael_of_ppower(pp):
 (p, a) = pp
 if ((p == 2) and (a > 2)):
  return (2 ** (a - 2))
 else:
  return ((p - 1) * (p ** (a - 1)))

def carmichael_of_ppower ( pp ) : ( p , a ) = pp if ( ( p == 2 ) and ( a > 2 ) ) : return ( 2 ** ( a - 2 ) ) else : return ( ( p - 1 ) * ( p ** ( a - 1 ) ) )
carmichael function of the given power of the given prime .