input: Write a function to generate a prime number sequence using Python. The function should return a list of all prime numbers up to a given positive integer n.
  def generate_prime_numbers(n):
      if n < 2:
          return []
      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
      return [i for i in range(n + 1) if primes[i]]
  
  assert generate_prime_numbers(10) == [2, 3, 5, 7]
  assert generate_prime_numbers(20) == [2, 3, 5, 7, 11, 13, 17, 19]
  assert generate_prime_numbers(0) == []
  assert generate_prime_numbers(1) == []
output: def generate_prime_numbers(n):
      if n < 2:
          return []
      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
      return [i for i in range(n + 1) if primes[i]]