def primorial(n, nth=True):
 if nth:
  n = as_int(n)
 else:
  n = int(n)
 if (n < 1):
  raise ValueError('primorial argument must be >= 1')
 p = 1
 if nth:
  for i in range(1, (n + 1)):
   p *= prime(i)
 else:
  for i in primerange(2, (n + 1)):
   p *= i
 return p

def primorial ( n , nth = True ) : if nth : n = as_int ( n ) else : n = int ( n ) if ( n < 1 ) : raise ValueError ( 'primorial argument must be >= 1' ) p = 1 if nth : for i in range ( 1 , ( n + 1 ) ) : p *= prime ( i ) else : for i in primerange ( 2 , ( n + 1 ) ) : p *= i return p
returns the product of the first n primes or the primes less than or equal to n .