from typing import List


def primes(n_max: int = 100) -> List[int]:
    """Implements the Eratosthene's sieve
    """
    if n_max < 2:
        raise ValueError

    t = list(range(2, n_max + 1))
    for i in t:
        for j in (k for k in t if k > i):
            if j % i == 0:
                t.remove(j)

    return sorted(t)