input: Write a function to print out the first n prime numbers using the Sieve of Eratosthenes algorithm. The function should take an integer n as input and return a list of the first n prime numbers. If n is 0 or negative, the function should return an empty list.
  assert sieve_of_eratosthenes(5)==[2, 3, 5, 7, 11]
  assert sieve_of_eratosthenes(0)==[]
  assert sieve_of_eratosthenes(1)==[2]
output: def sieve_of_eratosthenes(n):
      if n <= 0:
          return []
      limit = 50  # Initial limit, can be adjusted based on n
      primes = []
      while len(primes) < n:
          is_prime = [True] * (limit + 1)
          is_prime[0], is_prime[1] = False, False
          for i in range(2, int(limit**0.5) + 1):
              if is_prime[i]:
                  for j in range(i*i, limit + 1, i):
                      is_prime[j] = False
          primes = [i for i, prime in enumerate(is_prime) if prime]
          limit *= 2
      return primes[:n]