input: Write a function to print out the first n prime numbers using the Sieve of Eratosthenes algorithm.
  def sieve_of_eratosthenes(n):
      primes = [True] * (n+1)
      primes[0] = primes[1] = False
      for i in range(2, int(n**0.5)+1):
          if primes[i]:
              for j in range(i*i, n+1, i):
                  primes[j] = False
  
      prime_numbers = []
      for i in range(len(primes)):
          if primes[i]:
              prime_numbers.append(i) 
      return prime_numbers
  
  # Test cases
  assert sieve_of_eratosthenes(10) == [2, 3, 5, 7]
  assert sieve_of_eratosthenes(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert sieve_of_eratosthenes(1) == []
  assert sieve_of_eratosthenes(0) == []
  assert sieve_of_eratosthenes(19) == [2, 3, 5, 7, 11, 13, 17, 19]
output: def sieve_of_eratosthenes(n):
      if n < 2:
          return []
      limit = n * 11  # A rough estimate to ensure we have enough primes
      primes = [True] * limit
      primes[0] = primes[1] = False
      for i in range(2, int(limit**0.5)+1):
          if primes[i]:
              for j in range(i*i, limit, i):
                  primes[j] = False
  
      prime_numbers = []
      count = 0
      for i in range(limit):
          if primes[i]:
              prime_numbers.append(i)
              count += 1
              if count == n:
                  break
      return prime_numbers