Lattice Points in an Ellipse by a Convex Hull Walk: the Sequence A218706 and Diagonal Quadratic Forms

Let a(n) be the number of pairs of non-negative integers (x, y) satisfying x^2 + 2*y^2 <= n^2, corresponding to the OEIS sequence A218706. The current entry provides enumeration programs and a column sum costing O(n) integer square roots. This paper generalizes the problem to diagonal quadratic forms w_x * x^2 + w_y * y^2 <= M for positive integers w_x, w_y and M >= 0. We prove that the number of points with x, y >= 1 equals A_x + A_y - X_0 * Y_0, where A_x and A_y are column and row sums over the boundary split by the point of slope -1 (with coordinates X_0, Y_0). Each sum is evaluated by a sublinear walk along the upper convex hull of the lattice points in the ellipse, where every step uses exact integer arithmetic. The Stern-Brocot descent step is solved in closed form via a convex quadratic in one integer variable. The method covers both A218706 and the classic Gauss circle sequence A000603 as special cases. The algorithm requires approximately 2 * M^(1/3) iterations, verified numerically against all published terms and independent counts up to M = 10^11. In Python 3.12, the value a(10^9) = 555,360,368,123,355,523 is computed in 9.6 s, and a(10^10) takes 50.8 s, significantly outperforming standard O(n) approaches.

Authors

Publication Details

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

Lattice Points in an Ellipse by a Convex Hull Walk: the Sequence A218706 and Diagonal Quadratic Forms

Mark Kim
4 links
Zenodo (CERN European Organization for Nuclear Research)
Analytic Number Theory Research
preprint

Lattice Points in an Ellipse by a Convex Hull Walk: the Sequence A218706 and Diagonal Quadratic Forms

Mark Kim
preprint en

Abstract

Let a(n) be the number of pairs of non-negative integers (x, y) satisfying x^2 + 2*y^2 <= n^2, corresponding to the OEIS sequence A218706. The current entry provides enumeration programs and a column sum costing O(n) integer square roots. This paper generalizes the problem to diagonal quadratic forms w_x * x^2 + w_y * y^2 <= M for positive integers w_x, w_y and M >= 0. We prove that the number of points with x, y >= 1 equals A_x + A_y - X_0 * Y_0, where A_x and A_y are column and row sums over the boundary split by the point of slope -1 (with coordinates X_0, Y_0). Each sum is evaluated by a sublinear walk along the upper convex hull of the lattice points in the ellipse, where every step uses exact integer arithmetic. The Stern-Brocot descent step is solved in closed form via a convex quadratic in one integer variable. The method covers both A218706 and the classic Gauss circle sequence A000603 as special cases. The algorithm requires approximately 2 * M^(1/3) iterations, verified numerically against all published terms and independent counts up to M = 10^11. In Python 3.12, the value a(10^9) = 555,360,368,123,355,523 is computed in 9.6 s, and a(10^10) takes 50.8 s, significantly outperforming standard O(n) approaches.

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