---
title: zaremba-density
canonical_url: "https://www.modelscope.cn/datasets/cahlen/zaremba-density"
md_url: "https://www.modelscope.cn/datasets/cahlen/zaremba-density.md"
repository: cahlen/zaremba-density
last_updated: 2026-07-20
license: cc-by-4.0
storage_size: "171 KB"
downloads: 186
stars: 0
---

# zaremba-density

> zaremba-density - cahlen 在 ModelScope 开源的数据集。Zaremba Density: GPU-Computed Exception Sets and Density Data

cahlen/zaremba-density 是 ModelScope 魔搭社区上的数据集，存储大小 171 KB，采用 cc-by-4.0 许可。

- **Repository**: cahlen/zaremba-density
- **License**: cc-by-4.0
- **Storage size**: 171 KB
- **Downloads**: 186
- **Stars**: 0
- **Last updated**: 2026-07-20

Source: https://www.modelscope.cn/datasets/cahlen/zaremba-density

---

# Zaremba Density: GPU-Computed Exception Sets and Density Data

**Canonical repository for all Zaremba density sweep data.** GPU-computed density measurements for Zaremba's conjecture across 100+ digit set / range combinations, computed on an 8x NVIDIA B200 cluster (1.4 TB VRAM).

> Part of the [bigcompute.science](https://bigcompute.science) project.

**Note:** Computational proof framework data (transfer operator, spectral gaps, representation counts) lives in [cahlen/zaremba-conjecture-data](https://huggingface.co/datasets/cahlen/zaremba-conjecture-data).

## What is Zaremba's Conjecture?

For every positive integer d, there exists a coprime a/d whose continued fraction has all partial quotients bounded by 5. The **density** of a digit set A at range N is the fraction of integers d in [1, N] that have at least one coprime a/d with all partial quotients in A.

## Dataset Contents

### `zaremba_density_all_results.csv`
Summary of all completed experiments: digit set, range, density, uncovered count, runtime.

### `density_sweep_1e6.csv` / `density_all_subsets_n10_1e6.csv`
Complete density sweep of all 1,023 non-empty subsets of {1,...,10} at N=10^6.

### `logs/`
All raw GPU log files with full output including uncovered denominator lists for closed exception sets. Covers ranges from 10^6 through 10^14.

### `results/`
Analysis JSON and harvested summaries.

## Key Results

### Closed Exception Sets (verified to 10^11)
| Digit Set | Exceptions | Verified To |
|-----------|-----------|-------------|
| {1,2,3} | 27 | 10^9 (10^11 running) |
| {1,2,4} | 64 | 10^10 (10^12 running) |
| {1,2,5} | 374 | 10^11 |
| {1,2,6} | 1,834 | 10^11 |
| {1,2,7} | 7,178 | 10^11 |

### Open (Growing) Exception Sets at 10^11
| Digit Set | Exceptions |
|-----------|-----------|
| {1,2,8} | 23,590 |
| {1,2,9} | 77,109 |
| {1,2,10} | 228,514 |

### {1,2} Logarithmic Convergence
| Range | Density |
|-------|---------|
| 10^6 | 61.28% |
| 10^9 | 72.06% |
| 10^10 | 76.55% |
| 10^11 | 80.75% |
| 10^12 | 84.58% |

Fits: density ~ 31.5 + 4.47 * log10(N). Predicts 100% at ~10^15.

## Hardware

- 8x NVIDIA B200 (180 GB each, ~1.4 TB total VRAM)
- Custom CUDA kernels with persistent threads, prefix-sorted work distribution

## Method and audit notes

The density kernel (`zaremba_density_gpu.cu`) uses a **different architecture** than the 210B verification kernel (`matrix_enum_multipass.cu`) and is **not** subject to the silent-clipping concern that applies to the multi-pass frontier-based kernel. Specifically:

- Each GPU thread holds a small per-thread recursive stack (depth 200, well above the longest CF path with q <= max_d) and writes `marked` bits directly into a fixed-size bitset of `(max_d + 7) / 8` bytes.
- There is no growing frontier buffer, no `BUF_SLOTS`, and no atomic writes into a size-limited output array. The only possible overflow is the per-thread stack, and `MAX_DEPTH = 200` is comfortably above the maximum CF depth reachable for `max_d <= 10^14` with smallest digit `a = 1` (Fibonacci growth implies at most ~60 levels at `max_d = 10^12`).
- The count of marked denominators is computed directly from the bitset via `__popc` and cross-checked against `max_d`.

Consequently, the exception counts and density values reported here are **machine-checkable from the bitset alone** and do not depend on a separate no-overflow certificate of the kind required for the 210B verification run. If someone re-runs the kernel at the same parameters on equivalent hardware, the bitset — and therefore the exception list and density — will be bit-identical.

See [`paper/CERTIFICATE.md`](https://github.com/cahlen/idontknow/blob/main/paper/CERTIFICATE.md) for the separate audit of the 210B verification kernel.

## Reproduction

```bash
nvcc -O3 -arch=sm_90 -o zaremba_density_gpu zaremba_density_gpu.cu -lm
./zaremba_density_gpu 100000000000 1,2,3
```

Source code: [github.com/cahlen/idontknow/tree/main/scripts/experiments/zaremba-density](https://github.com/cahlen/idontknow/tree/main/scripts/experiments/zaremba-density)

## Related Datasets

- **[cahlen/zaremba-conjecture-data](https://huggingface.co/datasets/cahlen/zaremba-conjecture-data)** — Computational proof framework: transfer operator, spectral gaps, representation counts
- **[cahlen/hausdorff-dimension-spectrum](https://huggingface.co/datasets/cahlen/hausdorff-dimension-spectrum)** — dim_H(E_A) for all 2^20-1 subsets

## Source

- **Code**: [zaremba-density](https://github.com/cahlen/idontknow/tree/main/scripts/experiments/zaremba-density)
- **Findings**: [Phase Transition](https://bigcompute.science/findings/zaremba-density-phase-transition/), [Exception Hierarchy](https://bigcompute.science/findings/zaremba-exception-hierarchy/)
- **Project**: [bigcompute.science](https://bigcompute.science)

## Citation

```bibtex
@misc{humphreys2026zaremba_density,
  author = {Humphreys, Cahlen and Claude (Anthropic)},
  title = {Zaremba Density: GPU-Computed Exception Sets and Density Data},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/datasets/cahlen/zaremba-density}
}
```

Human-AI collaborative work (Cahlen Humphreys + Claude). Not independently peer-reviewed. All code and data open for verification. CC BY 4.0.
