input: from typing import List
  
  
  def generate_prime_numbers(n: int) -> List[int]:
      """ Generate a list of prime numbers up to the given number n using the Sieve of Eratosthenes algorithm.
      >>> generate_prime_numbers(10)
      [2, 3, 5, 7]
      >>> generate_prime_numbers(20)
      [2, 3, 5, 7, 11, 13, 17, 19]
      """
      primes = [True for _ in range(n + 1)]
      p = 2
      while (p * p <= n):
          if (primes[p] == True):
              for i in range(p * p, n + 1, p):
                  primes[i] = False
          p += 1
      primes[0] = False
      primes[1] = False
      prime_numbers = [p for p in range(n + 1) if primes[p]]
      return prime_numbers
output:     primes = [True for _ in range(n + 1)]
      p = 2
      while (p * p <= n):
          if (primes[p] == True):
              for i in range(p * p, n + 1, p):
                  primes[i] = False
          p += 1
      primes[0] = False
      primes[1] = False
      prime_numbers = [p for p in range(n + 1) if primes[p]]
      return prime_numbers