Exact Counting of Lattice Points in Balls of Dimensions 6 and 8 in $O(\sqrt{N})$ Operations: Hyperbola Sums for the Sequences A055412 and A055414

Let N_k(N) be the number of points of Z^k with squared norm at most N. The OEIS sequences A055412 and A055414 are a(n)=N_k(n^2) for k=6 and $k=8$. The numbers r_6(m) and r_8(m) of representations of m as a sum of six and eight squares are divisor sums (Glaisher). We prove that N_6(N) and N_8(N) are explicit combinations of the hyperbola sums sum_{d<=N} d^2 * c([N/d]), sum_{d<=N} chi(d) * d^2 * [N/d] and sum_{d<=X} d^3 * [X/d], where chi is the non-principal character modulo 4 and c is the indicator of m mod 4 in {1,2}. Each value is computed exactly with at most 4.5 * sqrt N blocks of constant quotient, that is O(n) operations for a(n), while the Python program of A055412 factors all m <= n^2 and the C++ program of its table costs Theta(R^3) for all terms up to R. The formulas reproduce all published terms. At n=1000 the Python program of A055412 takes 11.4 s and the formula 0.0057 s (0.00049 s in C); a(n) for n=10^8 takes 43.6 s in C for k=6.

Authors

Publication Details

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

Exact Counting of Lattice Points in Balls of Dimensions 6 and 8 in $O(\sqrt{N})$ Operations: Hyperbola Sums for the Sequences A055412 and A055414

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

Exact Counting of Lattice Points in Balls of Dimensions 6 and 8 in $O(\sqrt{N})$ Operations: Hyperbola Sums for the Sequences A055412 and A055414

Mark Kim
preprint en

Abstract

Let N_k(N) be the number of points of Z^k with squared norm at most N. The OEIS sequences A055412 and A055414 are a(n)=N_k(n^2) for k=6 and $k=8$. The numbers r_6(m) and r_8(m) of representations of m as a sum of six and eight squares are divisor sums (Glaisher). We prove that N_6(N) and N_8(N) are explicit combinations of the hyperbola sums sum_{d<=N} d^2 * c([N/d]), sum_{d<=N} chi(d) * d^2 * [N/d] and sum_{d<=X} d^3 * [X/d], where chi is the non-principal character modulo 4 and c is the indicator of m mod 4 in {1,2}. Each value is computed exactly with at most 4.5 * sqrt N blocks of constant quotient, that is O(n) operations for a(n), while the Python program of A055412 factors all m <= n^2 and the C++ program of its table costs Theta(R^3) for all terms up to R. The formulas reproduce all published terms. At n=1000 the Python program of A055412 takes 11.4 s and the formula 0.0057 s (0.00049 s in C); a(n) for n=10^8 takes 43.6 s in C for k=6.

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