




import random

from .binary_exp_mod import bin_exp_mod

def    UpperCAmelCase_				( __UpperCAmelCase		:      Union[str, Any]     ,     __UpperCAmelCase		:      List[Any]=10_00				)   ->					Optional[int]:
      if n < 2:
            return False

      if n % 2 == 0:
            return n == 2

      # this means n is odd
      SCREAMING_SNAKE_CASE_      		=     n - 1
      SCREAMING_SNAKE_CASE_      		=     0
      while d % 2 == 0:
            d /= 2
            exp += 1

      # n - 1=d*(2**exp)
      SCREAMING_SNAKE_CASE_      		=     0
      while count < prec:
            SCREAMING_SNAKE_CASE_      		=     random.randint(2     ,     n - 1				)
            SCREAMING_SNAKE_CASE_      		=     bin_exp_mod(__UpperCAmelCase     ,     __UpperCAmelCase     ,     __UpperCAmelCase				)
            if b != 1:
                  SCREAMING_SNAKE_CASE_      		=     True
                  for _ in range(__UpperCAmelCase				):
                        if b == n - 1:
                              SCREAMING_SNAKE_CASE_      		=     False
                              break
                        SCREAMING_SNAKE_CASE_      		=     b * b
                        b %= n
                  if flag:
                        return False
                  count += 1
      return True


if __name__ == "__main__":
   lowerCamelCase__					:  str      							=				abs(int(input('Enter bound : ').strip()))
   print('Here\'s the list of primes:')
   print(', '.join(str(i) for i in range(n + 1) if is_prime_big(i)))





def    UpperCAmelCase_				( __UpperCAmelCase		:      int				)   ->					int:
      assert isinstance(__UpperCAmelCase     ,     __UpperCAmelCase				), f"The input value of [n={number}] is not an integer"

      if number == 1:
            return 2
      elif number < 1:
            SCREAMING_SNAKE_CASE_      		=     f"The input value of [n={number}] has to be > 0"
            raise ValueError(__UpperCAmelCase				)
      else:
            SCREAMING_SNAKE_CASE_      		=     sylvester(number - 1				)
            SCREAMING_SNAKE_CASE_      		=     num - 1
            SCREAMING_SNAKE_CASE_      		=     num
            return lower * upper + 1


if __name__ == "__main__":
   print(f'''The 8th number in Sylvester\'s sequence: {sylvester(8)}''')