input: Write a function to find and return a list of the first n prime numbers using the Sieve of Eratosthenes algorithm. If n is less than 1, return an empty list.
  assert sieve_of_eratosthenes(0)==[]
  assert sieve_of_eratosthenes(1)==[2]
  assert sieve_of_eratosthenes(5)==[2, 3, 5, 7, 11]
  assert sieve_of_eratosthenes(10)==[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
  assert sieve_of_eratosthenes(-1)==[]
output: def sieve_of_eratosthenes(n):
      if n < 1:
          return []
      limit = 50  # Initial limit, can be adjusted based on n
      while True:
          sieve = [True] * (limit + 1)
          sieve[0] = sieve[1] = False
          for start in range(2, int(limit**0.5) + 1):
              if sieve[start]:
                  for multiple in range(start*start, limit + 1, start):
                      sieve[multiple] = False
          primes = [num for num, is_prime in enumerate(sieve) if is_prime]
          if len(primes) >= n:
              return primes[:n]
          limit *= 2