# `gno.land/p/moul/x/daily/sieve/v0`
**Sieve of Eratosthenes** — `PrimesUpTo`, `NthPrime`, `IsPrime`, `MaxN`.
A deterministic, allocation-friendly port of Go's classic concurrent prime-sieve
example — no goroutines, channels, or clocks, so it runs reproducibly on-chain.
`MaxN` (10000) bounds the sieve so gas stays predictable.
```go
import "gno.land/p/moul/x/daily/sieve/v0"
primes := sieve.PrimesUpTo(30) // [2 3 5 7 11 13 17 19 23 29]
p := sieve.NthPrime(10) // 29 (1-indexed; 0 beyond MaxN)
ok := sieve.IsPrime(9973) // true
```
**Live demo:** [`r/moul/x/daily/sievedemo`](https://github.com/moul/gno-contracts/tree/main/r/moul/x/daily/sievedemo/v0)
· render it at [`/r/moul/x/daily/sievedemo/v0`](https://gno.land/r/moul/x/daily/sievedemo/v0).
<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->
---
Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
> 🧪 **Highly experimental — potentially vibe-coded.** Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).
<!-- END GNOCONTRACTS FOOTER -->
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.