これはエラトステネスのふるいのPython実装で、与えられた極限までの全ての素数を見つけるアルゴリズムです：

```python
def sieve(n: int) -> list[int]:
    """computes the Sieve of Eratosthenes, returning the list of all prime numbers up to (excluding) n"""
    primes = [True] * n
    for i in range(2, int(n**0.5)):
        if primes[i]:
            # Iterate over multiples of i and mark them as non-prime
            for k in range(i*2, n, i):
                primes[k] = False

    # Return all indices marked as primes (except for 1, which is a special case)
    return [i for i in range(2, n) if primes[i]]
```
Here is a Python implementation of the Sieve of Eratosthenes, which is an algorithm for finding all prime numbers up to a given limit:

```python
def sieve(n: int) -> list[int]:
    """computes the Sieve of Eratosthenes, returning the list of all prime numbers up to (excluding) n"""
    primes = [True] * n
    for i in range(2, int(n**0.5)):
        if primes[i]:
            # Iterate over multiples of i and mark them as non-prime
            for k in range(i*2, n, i):
                primes[k] = False

    # Return all indices marked as primes (except for 1, which is a special case)
    return [i for i in range(2, n) if primes[i]]
```