Table of Contents
Fetching ...

An Algorithm to Find Sums of Powers of Consecutive Primes

Cathal O'Sullivan, Jonathan P. Sorenson, Aryn Stahl

TL;DR

This paper studies representations of integers as sums of consecutive $k$th powers of primes for $k>1$, introducing two algorithms: an enumeration algorithm that outputs all representations with time proportional to the number of representations and a counting algorithm that computes the total number of representations without listing them. It proves sharp asymptotic bounds for ${s}_k(x)$, showing ${s}_k(x) \le (1+o(1)) c_k \frac{ x^{2/(k+1)} }{ (\log x)^{2k/(k+1)} }$ with $c_k=\frac{k^2}{k-1}\,(k+1)^{1-1/k}$ and a matching lower bound of the same order, generalizing prior work for sums of squares of consecutive primes. The results connect combinatorial counting with prime-sum structure via a partition by sum-length $m$, bounding the number of contributions from each length and bounding the maximal length $M(x,k)$. Empirically, the authors compute ${\mathcal{S}}_k(x)$ for various $k$ and $x$, verify the bounds’ relative tightness, examine duplicates, and present initial elements of ${\mathcal{S}}_k$, highlighting both the practical runtime and the occurrence (or rarity) of multiple representations. The work offers practical enumeration and counting methods with provable asymptotic behavior and suggests avenues for parallelization and explicit constants in future investigations.

Abstract

We present and analyze an algorithm to enumerate all integers $n\le x$ that can be written as the sum of consecutive $k$th powers of primes, for $k>1$. We show that the number of such integers $n$ is asymptotically bounded by a constant times $$ c_k \frac{ x^{2/(k+1)} }{ (\log x)^{2k/(k+1)} }, $$ where $c_k$ is a constant depending solely on $k$, roughly $k^2$ in magnitude. This also bounds the asymptotic running time of our algorithm. We also give a lower bound of the same order of magnitude, and a very fast algorithm that counts such $n$. Our work extends the previous work by Tongsomporn, Wananiyakul, and Steuding (2022) who examined sums of squares of consecutive primes.

An Algorithm to Find Sums of Powers of Consecutive Primes

TL;DR

This paper studies representations of integers as sums of consecutive th powers of primes for , introducing two algorithms: an enumeration algorithm that outputs all representations with time proportional to the number of representations and a counting algorithm that computes the total number of representations without listing them. It proves sharp asymptotic bounds for , showing with and a matching lower bound of the same order, generalizing prior work for sums of squares of consecutive primes. The results connect combinatorial counting with prime-sum structure via a partition by sum-length , bounding the number of contributions from each length and bounding the maximal length . Empirically, the authors compute for various and , verify the bounds’ relative tightness, examine duplicates, and present initial elements of , highlighting both the practical runtime and the occurrence (or rarity) of multiple representations. The work offers practical enumeration and counting methods with provable asymptotic behavior and suggests avenues for parallelization and explicit constants in future investigations.

Abstract

We present and analyze an algorithm to enumerate all integers that can be written as the sum of consecutive th powers of primes, for . We show that the number of such integers is asymptotically bounded by a constant times where is a constant depending solely on , roughly in magnitude. This also bounds the asymptotic running time of our algorithm. We also give a lower bound of the same order of magnitude, and a very fast algorithm that counts such . Our work extends the previous work by Tongsomporn, Wananiyakul, and Steuding (2022) who examined sums of squares of consecutive primes.
Paper Structure (13 sections, 4 theorems, 15 equations)

This paper contains 13 sections, 4 theorems, 15 equations.

Key Result

Theorem 4.1

For $k>1$ we have where $c_k=(k^2/(k-1))\cdot (k+1)^{1-1/k}$.

Theorems & Definitions (4)

  • Theorem 4.1
  • Lemma 4.2: TWS2022
  • Lemma 4.3
  • Theorem 4.4