Computing the Ulam sequence to 7·10^13 with little memory

We computed the Ulam sequence up to 7·10^13: there are 5 178 547 339 755 Ulam numbers below 7·10^13. The previous published computations reached 10^12 (Gibbs and McCranie) and 10^13 (Álvarez Miguel). The program follows Gibbs's method. For λ≈2.4434, almost all terms n have {n/λ} in the middle third of the circle, and a number in the middle third can only be the sum of one of the few exceptional terms (the outliers) and another term. Unlike Knuth's implementation of the method, our program does not keep a table of all earlier numbers. It keeps only the outliers, a window of recent numbers and an archive of the terms near the two edges of the middle third. A lookup that these data cannot answer returns "unknown", and a number is declared a term or a non-term only by rules that are correct whatever the unknown values are; if no rule applies, the program stops. We prove that these rules are sound: if the program implements them correctly, its output is correct whenever it finishes, whatever fixed-point approximation of 1/λ it uses; the approximation changes which terms the program treats as outliers, and with it the work and memory required, and it can make the program stop, but it does not affect correctness. The output agrees with a full-memory computation to 2^34, with the counts of Gibbs and McCranie to 10^12, and with Álvarez Miguel's count below 10^13 and his 7 400 reported values U_k (k a multiple of 10^8). The counts beyond 10^13 come from a single run of our program and have not been checked independently.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-23
DOI
https://doi.org/10.5281/zenodo.24475118
Primary Topic
Analytic Number Theory Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Computing the Ulam sequence to 7·10^13 with little memory

Shunsuke Funayama
Zenodo (CERN European Organization for Nuclear Research)
Analytic Number Theory Research
preprint

Computing the Ulam sequence to 7·10^13 with little memory

Shunsuke Funayama
preprint en

Abstract

We computed the Ulam sequence up to 7·10^13: there are 5 178 547 339 755 Ulam numbers below 7·10^13. The previous published computations reached 10^12 (Gibbs and McCranie) and 10^13 (Álvarez Miguel). The program follows Gibbs's method. For λ≈2.4434, almost all terms n have {n/λ} in the middle third of the circle, and a number in the middle third can only be the sum of one of the few exceptional terms (the outliers) and another term. Unlike Knuth's implementation of the method, our program does not keep a table of all earlier numbers. It keeps only the outliers, a window of recent numbers and an archive of the terms near the two edges of the middle third. A lookup that these data cannot answer returns "unknown", and a number is declared a term or a non-term only by rules that are correct whatever the unknown values are; if no rule applies, the program stops. We prove that these rules are sound: if the program implements them correctly, its output is correct whenever it finishes, whatever fixed-point approximation of 1/λ it uses; the approximation changes which terms the program treats as outliers, and with it the work and memory required, and it can make the program stop, but it does not affect correctness. The output agrees with a full-memory computation to 2^34, with the counts of Gibbs and McCranie to 10^12, and with Álvarez Miguel's count below 10^13 and his 7 400 reported values U_k (k a multiple of 10^8). The counts beyond 10^13 come from a single run of our program and have not been checked independently.

Zenodo (CERN European Organization for Nuclear Research)
Analytic Number Theory Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Computing the Ulam sequence to 7·10^13 with little memory — Shunsuke Funayama · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS