English
Related papers

Related papers: A Note on Algorithms for Computing $p_n$

200 papers

Suppose we have n algorithms, quantum or classical, each computing some bit-value with bounded error probability. We describe a quantum algorithm that uses O(sqrt{n}) repetitions of the base algorithms and with high probability finds the…

Quantum Physics · Physics 2017-01-03 Peter Hoyer , Michele Mosca , Ronald de Wolf

A new derivation of the classic asymptotic expansion of the n-th prime is presented. A fast algorithm for the computation of its terms is also given, which will be an improvement of that by Salvy (1994). Realistic bounds for the error with…

Number Theory · Mathematics 2014-03-25 Juan Arias de Reyna , Toulisse Jeremy

From known effective bounds on the prime counting function of the form \[ |\pi(x)-\mathrm{Li}(x)| < a \;x \;(\ln x)^{b} \; \exp\left(-{c}\; \sqrt{\ln x}\right); \qquad (x \geq x_0); \] it is possible to establish exponentially tight…

Number Theory · Mathematics 2025-06-17 Matt Visser

We give an O(sqrt n log n)-query quantum algorithm for evaluating size-n AND-OR formulas. Its running time is poly-logarithmically greater after efficient preprocessing. Unlike previous approaches, the algorithm is based on a quantum walk…

Quantum Physics · Physics 2011-10-11 Ben W. Reichardt

The set of short intervals between consecutive primes squared has the pleasant---but seemingly unexploited---property that each interval $s_k:=\{p_k^2, \dots,p_{k+1}^2-1\}$ is fully sieved by the $k$ first primes. Here we take advantage of…

Number Theory · Mathematics 2014-08-13 Kolbjørn Tunstrøm

We present the first fixed-length elementary closed-form expressions for the prime-counting function, $\pi(n)$, and the $n$-th prime number, $p(n)$. These expressions are arithmetic terms, requiring only a finite and fixed number of…

Number Theory · Mathematics 2025-08-05 Mihai Prunescu , Joseph M. Shunia

The search for a closed-form expression of the $n$-th prime number, $p_n$, has long oscillated between the rigid determinism of analytic functions and the apparent randomness of local distributions. This paper explores three different…

General Mathematics · Mathematics 2026-01-28 Jean-Christophe Pain

We consider methods for finding high-precision approximations to simple zeros of smooth functions. As an application, we give fast methods for evaluating the elementary functions log(x), exp(x), sin(x) etc. to high precision. For example,…

Numerical Analysis · Computer Science 2010-06-01 Richard P. Brent

Given a set $P$ of $n$ points and a set $S$ of $n$ segments in the plane, we consider the problem of computing for each segment of $S$ its closest point in $P$. The previously best algorithm solves the problem in $n^{4/3}2^{O(\log^*n)}$…

Computational Geometry · Computer Science 2024-01-08 Haitao Wang

This work is a probabilistic study of the 'primes' of the Cram\'er model. We prove that there exists a set of integers $\mathcal S$ of density 1 such that \begin{equation}\liminf_{ \mathcal S\ni n\to\infty} (\log n)\mathbb{P} \{S_n\…

Number Theory · Mathematics 2026-05-22 Michel Weber

N-fold integer programming is a fundamental problem with a variety of natural applications in operations research and statistics. Moreover, it is universal and provides a new, variable-dimension, parametrization of all of integer…

Optimization and Control · Mathematics 2014-05-08 Raymond Hemmecke , Shmuel Onn , Lyubov Romanchuk

Using some simple combinatorial arguments, we establish some new estimates for the prime counting function and its allied functions. In particular we show that \begin{align}\pi(x)=\Theta(x)+O\bigg(\frac{1}{\log x}\bigg), \nonumber…

Number Theory · Mathematics 2021-08-24 Theophilus Agama

For $x\ge0$ let $\pi(x)$ be the number of primes not exceeding $x$. The asymptotic behaviors of the prime-counting function $\pi(x)$ and the $n$-th prime $p_n$ have been studied intensively in analytic number theory. Surprisingly, we find…

Number Theory · Mathematics 2016-02-26 Zhi-Wei Sun

We assume the permutation $\pi$ is given by an $n$-element array in which the $i$-th element denotes the value $\pi(i)$. Constructing its inverse in-place (i.e. using $O(\log{n})$ bits of additional memory) can be achieved in linear time…

Data Structures and Algorithms · Computer Science 2020-04-22 Grzegorz Guśpiel

Odd numbers can be indexed by the map k(n)=(n-3)/2, n belonging to 2N+3. We first propose a basic primality test using this index function that was first introduced in article (8). Input size of operations is reduced which improves…

General Mathematics · Mathematics 2021-06-03 Marc Wolf , François Wolf

In this paper, we propose a new primality test, and then we employ this test to find a formula for {\pi} that computes the number of primes within any interval. We finally propose a new formula that computes the nth prime number as well as…

Number Theory · Mathematics 2012-04-19 Issam Kaddoura , Samih Abdul-Nabi

Given a large positive integer $N$, how quickly can one construct a prime number larger than $N$ (or between $N$ and 2N)? Using probabilistic methods, one can obtain a prime number in time at most $\log^{O(1)} N$ with high probability by…

Number Theory · Mathematics 2012-05-29 D. H. J. Polymath

We have rediscovered a simple algorithm to compute the mathematical constant \[ \pi=3.14159265\cdots. \] The algorithm had been known for a long time but it might not be recognized as a fast, practical algorithm. The time complexity of it…

Number Theory · Mathematics 2019-12-24 Tsz-Wo Sze

In 1973, L.A. Levin published an algorithm that solves any inversion problem $\pi$ as quickly as the fastest algorithm $p^*$ computing a solution for $\pi$ in time bounded by $2^{l(p^*)}.t^*$, where $l(p^*)$ is the length of the binary…

Computational Complexity · Computer Science 2017-02-13 Fouad B. Chedid

Many applications, including rank aggregation and crowd-labeling, can be modeled in terms of a bivariate isotonic matrix with unknown permutations acting on its rows and columns. We consider the problem of estimating such a matrix based on…

Machine Learning · Statistics 2018-06-06 Cheng Mao , Ashwin Pananjady , Martin J. Wainwright