Skip to main content
QUICK REVIEW

[Paper Review] Two algorithms for evaluation of the Newman digit sum, and a new proof of Coquet's theorem

Vladimir Shevelev|arXiv (Cornell University)|Sep 6, 2007
Mathematical and Theoretical AnalysisMathematics1 references8 citations
TL;DR

This paper presents two efficient algorithms for computing the Newman digit sum, defined as the difference between the count of integers with even and odd binary digit sums in residue classes modulo 3. It provides an elementary proof of Coquet's sharp bounds on this sum, establishing that $ S_{3,0}(3x) $ is bounded between $ \frac{2\sqrt{3}}{3}x^\lambda $ and $ \frac{55}{3}\left(\frac{3}{65}\right)^\lambda x^\lambda $, where $ \lambda = \frac{\ln 3}{\ln 4} $, and offers a fast computational method for experimental verification.

ABSTRACT

We give two simple algorithms for the evaluation of difference between the numbers of multiples of 3 with even and odd binary digit sums in interval [0,x), and give an elementary proof of Coquet's sharp estimates for it.

Motivation & Objective

  • To develop efficient algorithms for the exact evaluation of the Newman digit sum $ S_{3,0}(x) $, defined as the difference between counts of integers ≤ x with even and odd binary digit sums in residue class 0 mod 3.
  • To provide a new, elementary proof of Coquet’s sharp asymptotic estimates for $ S_{3,0}(x) $, correcting a misprint in the original formulation.
  • To establish tight explicit bounds for $ S_{3,0}(3x) $, showing it grows as $ \Theta(x^\lambda) $ with $ \lambda = \frac{\ln 3}{\ln 4} $, and to validate these bounds via computational algorithms.
  • To extend the method to compute $ S_{3,1}(x) $, $ S_{3,2}(x) $, and $ S_{3\cdot 2^k,r}(x) $, enabling broader application to digit sum distributions in arithmetic progressions.

Proposed method

  • The paper introduces a recursive algorithm based on binary expansions and modular arithmetic, using the function $ t(y) = \sum (-1)^{k_i} $ for binary digits $ 2^{k_i} $, which satisfies $ t(y) \equiv y \pmod{3} $, to classify intervals and reduce evaluation to known base cases.
  • It derives closed-form expressions for $ S_{3,0}(2^m) $ and $ S_{3,0}([2^n, 2^n + 2^m)) $, which serve as fundamental building blocks for the recursive evaluation of $ S_{3,0}(x) $.
  • A fast algorithm for exact evaluation of $ S_{3,0}(N) $ is constructed using recursive decomposition based on the binary representation of $ N $, enabling efficient numerical experiments.
  • The authors define auxiliary functions $ \nu(x) $, $ G(x) $, and $ H(x) $, and prove their periodicity (with periods 24, 2, and 16 respectively), which underpins the proof of Coquet’s result and the derivation of sharp bounds.
  • The proof of the sharp bounds relies on a functional equation involving $ S_{3,0}(x) $, $ S_{3,0}(\lfloor x/4 \rfloor) $, and the digit sum $ s(x) $, leading to a periodic correction term that captures the oscillatory behavior.
  • The method uses case analysis based on $ x \mod 12 $ and $ \lfloor x/4 \rfloor \mod 2 $, with explicit formulas for the difference $ \delta(x) = S_{3,0}(x) - S_{3,0}(4\lfloor x/4 \rfloor) $, which is key to the recursive structure.

Experimental results

Research questions

  • RQ1What are efficient algorithms for the exact evaluation of the Newman digit sum $ S_{3,0}(x) $, defined as the difference between the number of integers ≤ x with even and odd binary digit sums in the residue class 0 mod 3?
  • RQ2Can Coquet’s sharp bounds on $ S_{3,0}(x) $ be reproven using an elementary method that avoids complex analysis or fractal functions?
  • RQ3What are the precise best-possible upper and lower bounds for $ S_{3,0}(3x) $, and how do they relate to the exponent $ \lambda = \frac{\ln 3}{\ln 4} $?
  • RQ4How can the recursive structure of digit sums modulo 3 be exploited to derive periodic correction functions that capture the oscillatory behavior of $ S_{3,0}(x) $?
  • RQ5Can the method be generalized to compute $ S_{3,1}(x) $, $ S_{3,2}(x) $, and $ S_{3\cdot 2^k,r}(x) $ with sharp estimates?

Key findings

  • The paper establishes the sharp bounds $ \frac{2\sqrt{3}}{3}x^\lambda \leq S_{3,0}(3x) \leq \frac{55}{3}\left(\frac{3}{65}\right)^\lambda x^\lambda $ for all $ x \geq 2 $, with $ \lambda = \frac{\ln 3}{\ln 4} $, confirming and refining Coquet’s original estimates.
  • An elementary proof is given for Coquet’s result, correcting a misprint in the original formulation of the correction term $ \eta(x) $, which was incorrectly stated as $ s(3x-3) $ but should be $ s(3x-1) $.
  • The function $ F(x) = (-1)^{s(x)}(S_{3,0}(x) - 3S_{3,0}(\lfloor x/4 \rfloor)) $ is proven to be periodic with period 24, providing a structural explanation for the oscillatory behavior of the Newman digit sum.
  • A fast algorithm for exact evaluation of $ S_{3,0}(N) $ is developed, which is highly suitable for numerical experiments and verification of the theoretical bounds.
  • The paper derives explicit formulas for $ S_{3,0}(2^m) $ and $ S_{3,0}([2^n, 2^n + 2^m)) $, showing that $ S_{3,0}(2^m) = 2 \cdot 3^{m/2 - 1} $ for even $ m $, and $ 3^{(m-1)/2} $ for odd $ m $, which are foundational to the recursive evaluation.
  • The difference $ \delta(x) = S_{3,0}(x) - S_{3,0}(4\lfloor x/4 \rfloor) $ is explicitly computed as a piecewise function depending on $ x \mod 12 $, with values $ (-1)^{s(x-j)} $ for $ j=1,2,3 $, and zero otherwise, enabling precise recursive computation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.