File size: 2,157 Bytes
516ef2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | ---
pretty_name: Prime List from 1 to 1e14
tags:
- mathematics
- prime-numbers
- parquet
configs:
- config_name: default
data_files:
- split: train
path: "1-1e14/*.parquet"
---
# Prime List from 1 to 1e14
## Purpose
This dataset publishes an ordered list of prime numbers in Parquet format for
streaming, selective shard downloads, and online preview. It contains prime
values only; it does not include labels, natural-language content, or derived
features.
## Coverage and shard contract
- Coverage: `1 <= p < 100,000,000,000,000` (`1e14`)
- Data directory: `1-1e14/`
- Number of shards: 1,000
- Integer interval width per shard: `100,000,000,000` (`1e11`)
- File name pattern: `part-NNNN-of-1000.parquet`
- Shard indices: `0000` through `0999`
Shard `i` contains every prime in the half-open interval
`[i * 1e11, (i + 1) * 1e11)`. The first shard therefore starts with `2`.
Adjacent shard intervals do not overlap and do not leave gaps.
Reading all 1,000 files in file-name order produces the complete globally
sorted list. The dataset is complete when every shard from
`part-0000-of-1000.parquet` through `part-0999-of-1000.parquet` is present.
## Schema
Each file is a directly readable Parquet file with the following schema:
| Column | Arrow type | Nullable | Ordering |
| --- | --- | --- | --- |
| `prime` | `uint64` | No | Strictly increasing |
Parquet data pages use ZSTD compression. A prime appears exactly once in the
shard responsible for its numeric interval.
## Usage
Use streaming mode with Hugging Face Datasets to avoid downloading the entire
collection at once:
```python
from datasets import load_dataset
primes = load_dataset(
"lzray/primelist",
data_files="1-1e14/*.parquet",
split="train",
streaming=True,
)
for row in primes.take(10):
print(row["prime"])
```
For a limited numeric range, select only the files whose shard intervals
intersect that range.
## Scope limitations
This repository provides prime enumeration data, not a primality-testing API
or an interactive calculator. Consumers should preserve the `uint64` type;
converting large values to a 32-bit integer will overflow.
|