primelist / README.md
lzray's picture
Add English dataset card
516ef2d verified
|
Raw
History Blame Contribute Delete
2.16 kB
metadata
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:

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.