SearcharxivSearch

arXiv subjects

Jonathan P. Sorenson

Publications and source records attributed to Jonathan P. Sorenson.

13 recordsLinked to original sources

Primes and almost primes between cubes

In this paper we study the problem of detecting prime numbers between all consecutive cubes. Firstly, we use a large computation to show that there is always a prime between $n^3$ and $(n+1)^3$ for $n^3\leq 1.649\cdot 10^{40}$. In addition, we use this computation and a sieve-theoretic argument to show that there exists a number with at most 2 prime factors (counting multiplicity) between $n^3$ and $(n+1)^3$ for all $n\geq 1$. Our sieving argument uses a logarithmic weighting procedure attributed to Richert, which yields significant numerical improvements over previous approaches.

math.NT

Analysis of Algorithms for Moser's Problems on Sums of Consecutive Primes

In his 1963 paper on the sum of consecutive primes, Moser posed four open questions related to $f(n)$, the number of ways an integer $n$ can be written as a sum of consecutive primes. (See also problem C2 from Richard K.~Guy's \textit{Unsolved Problems in Number Theory}.) In this paper, we present and analyze two algorithms that, when given a bound $x$, construct a histogram of values of $f(n)$ for all $n\le x$. These two algorithms were described, but not analyzed, by Jean Charles Meyrignac (2000) and Michael S. Branicky (2022). We show the first algorithm takes $O(x\log x)$ time using $x^{2/3}$ space, and the second has two versions, one of which takes $O(x\log x)$ time but only $x^{3/5}$ space, and the other which takes $O(x(\log x)^2)$ time but only $O( \sqrt{x\log x})$ space. However, Meyrinac's algorithm is easier to parallelize. We then present data generated by these algorithms that address all four open questions.

math.NT

Explicit Bounds and Parallel Algorithms for Counting Multiply Gleeful Numbers

Let $k\ge 1$ be an integer. A positive integer $n$ is $k$-\textit{gleeful} if $n$ can be represented as the sum of $k$th powers of consecutive primes. For example, $35=2^3+3^3$ is a $3$-gleeful number, and $195=5^2+7^2+11^2$ is $2$-gleeful. In this paper, we present some new results on $k$-gleeful numbers for $k>1$. First, we extend previous analytical work. For given values of $x$ and $k$, we give explicit upper and lower bounds on the number of $k$-gleeful representations of integers $n\le x$. Second, we describe and analyze two new, efficient parallel algorithms, one theoretical and one practical, to generate all $k$-gleeful representations up to a bound $x$. Third, we study integers that are multiply gleeful, that is, integers with more than one representation as a sum of powers of consecutive primes, including both the same or different values of $k$. We give a simple heuristic model for estimating the density of multiply-gleeful numbers, we present empirical data in support of our heuristics, and offer some new conjectures.

math.NT

Reducing the Space Used by the Sieve of Eratosthenes When Factoring

We present a version of the sieve of Eratosthenes that can factor all integers $\le x$ in $O(x \log\log x)$ arithmetic operations using at most $O(\sqrt{x}/\log\log x)$ bits of space. This is an improved space bound under the condition that the algorithm takes at most $O(x\log\log x)$ time. We also show our algorithm performs well in practice.

cs.DS

Computation of the least primitive root

Let $g(p)$ denote the least primitive root modulo $p$, and $h(p)$ the least primitive root modulo $p^2$. We computed $g(p)$ and $h(p)$ for all primes $p\le 10^{16}$. Here we present the results of that computation and prove three theorems as a consequence. In particular, we show that $g(p) 3$ and that $h(p)<p^{2/3}$ for all primes $p$.

math.NT

An Algorithm to Find Sums of Powers of Consecutive Primes

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.

math.NT

An Algorithm for Ennola's Second Theorem and Counting Smooth Numbers in Practice

Let $Ψ(x,y)$ count the number of positive integers $n\le x$ such that every prime divisor of $n$ is at most $y$. Given inputs $x$ and $y$, what is the best way to estimate $Ψ(x,y)$? We address this problem in three ways: with a new algorithm to estimate $Ψ(x,y)$, with a performance improvement to an established algorithm, and with empirically based advice on how to choose an algorithm to estimate $Ψ$ for the given inputs. Our new algorithm to estimate $Ψ(x,y)$ is based on Ennola's second theorem [Ennola69], which applies when $y< (\log x)^{3/4-ε}$ for $ε>0$. It takes $O(y^2/\log y)$ arithmetic operations of precomputation and $O(y\log y)$ operations per evaluation of $Ψ$. We show how to speed up Algorithm HT, which is based on the saddle-point method of Hildebrand and Tenenbaum [1986], by a factor proportional to $\log\log x$, by applying Newton's method in a new way. And finally we give our empirical advice based on five algorithms to compute estimates for $Ψ(x,y)$.The challenge here is that the boundaries of the ranges of applicability, as given in theorems, often include unknown constants or small values of $ε>0$, for example, that cannot be programmed directly.

math.NT

Two Algorithms to Find Primes in Patterns

Let $k\ge 1$ be an integer, and let $P= (f_1(x), \ldots, f_k(x) )$ be $k$ admissible linear polynomials over the integers, or \textit{the pattern}. We present two algorithms that find all integers $x$ where $\max{ \{f_i(x) \} } \le n$ and all the $f_i(x)$ are prime. Our first algorithm takes at most $O_P(n/(\log\log n)^k)$ arithmetic operations using $O(k\sqrt{n})$ space. Our second algorithm takes slightly more time, $O_P(n/(\log \log n)^{k-1})$ arithmetic operations, but uses only $n^{1/c}$ space for a constant $c>2$. We prove correctness unconditionally, but the running time relies on two unproven but reasonable conjectures. We are unaware of any previous complexity results for this problem beyond the use of a prime sieve. We also implemented several parallel versions of our second algorithm to show it is viable in practice. In particular, we found some new Cunningham chains of length 15, and we found all quadruplet primes up to $10^{17}$.

math.NT

Strong Pseudoprimes to Twelve Prime Bases

Let $ψ_m$ be the smallest strong pseudoprime to the first $m$ prime bases. This value is known for $1 \leq m \leq 11$. We extend this by finding $ψ_{12}$ and $ψ_{13}$. We also present an algorithm to find all integers $n\le B$ that are strong pseudoprimes to the first $m$ prime bases; with a reasonable heuristic assumption we can show that it takes at most $B^{2/3+o(1)}$ time.

math.NT

Two Compact Incremental Prime Sieves

A prime sieve is an algorithm that finds the primes up to a bound $n$. We say that a prime sieve is incremental, if it can quickly determine if $n+1$ is prime after having found all primes up to $n$. We say a sieve is compact if it uses roughly $\sqrt{n}$ space or less. In this paper we present two new results: (1) We describe the rolling sieve, a practical, incremental prime sieve that takes $O(n\log\log n)$ time and $O(\sqrt{n}\log n)$ bits of space, and (2) We show how to modify the sieve of Atkin and Bernstein (2004) to obtain a sieve that is simultaneously sublinear, compact, and incremental. The second result solves an open problem given by Paul Pritchard in 1994.

cs.DS

Sieving for pseudosquares and pseudocubes in parallel using doubly-focused enumeration and wheel datastructures

We extend the known tables of pseudosquares and pseudocubes, discuss the implications of these new data on the conjectured distribution of pseudosquares and pseudocubes, and present the details of the algorithm used to do this work. Our algorithm is based on the space-saving wheel data structure combined with doubly-focused enumeration, run in parallel on a cluster supercomputer.

math.NT

A Randomized Sublinear Time Parallel GCD Algorithm for the EREW PRAM

We present a randomized parallel algorithm that computes the greatest common divisor of two integers of n bits in length with probability 1-o(1) that takes O(n loglog n / log n) expected time using n^{6+ε} processors on the EREW PRAM parallel model of computation. We believe this to be the first randomized sublinear time algorithm on the EREW PRAM for this problem.

cs.DS

Online Sorting via Searching and Selection

In this paper, we present a framework based on a simple data structure and parameterized algorithms for the problems of finding items in an unsorted list of linearly ordered items based on their rank (selection) or value (search). As a side-effect of answering these online selection and search queries, we progressively sort the list. Our algorithms are based on Hoare's Quickselect, and are parameterized based on the pivot selection method. For example, if we choose the pivot as the last item in a subinterval, our framework yields algorithms that will answer q<=n unique selection and/or search queries in a total of O(n log q) average time. After q=Ω(n) queries the list is sorted. Each repeated selection query takes constant time, and each repeated search query takes O(log n) time. The two query types can be interleaved freely. By plugging different pivot selection methods into our framework, these results can, for example, become randomized expected time or deterministic worst-case time. Our methods are easy to implement, and we show they perform well in practice.

cs.DS