Related papers: A Note on Algorithms for Computing $p_n$
We present an efficient and elementary algorithm for computing the number of primes up to $N$ in $\tilde{O}(\sqrt N)$ time, improving upon the existing combinatorial methods that require $\tilde{O}(N ^ {2/3})$ time. Our method has a similar…
This paper describes recent advances in the combinatorial method for computing $\pi(x)$, the number of primes $\leq x$. In particular, the memory usage has been reduced by a factor of $\log x$, and modifications for shared- and…
The prime-counting function $\pi(x)$ which computes the number of primes smaller or equal to a given real number has a long-standing interest in number theory. The present manuscript proposes a method to compute $\pi(x)$ with time…
The results of the study provide guidelines for the development and applications of algorithms. When the number of steps for calculating an assumption tends to infinity, probability theory can be applied to predict whether the assumption…
A method for computing the n'th decimal digit of pi in O(n^3 log(n)^3) time and with very little memory is presented here. The computation is based on the recently discovered Bailey-Borwein-Plouffe algorithm and the use of a new algorithm…
In this paper, two approximation algorithms are given. Let N be an odd composite number. The algorithms give new directions regarding primality test of given N. The first algorithm is given using a new method called digital coding method.…
We state a general purpose algorithm for quickly finding primes in evenly divided sub-intervals. Legendre's conjecture claims that for every positive integer $n$, there exists a prime between $n^2$ and $(n+1)^2$. Oppermann's conjecture…
All the known approximations of the number of primes pi(n) not exceeding any given integer n are derived from real-valued functions that are asymptotic to pi(x), such as x/log x, Li(x) and Riemann's function R(x). The degree of…
Prime number theorem asserts that (at large $x$) the prime counting function $\pi(x)$ is approximately the logarithmic integral $\mbox{li}(x)$. In the intermediate range, Riemann prime counting function $\mbox{Ri}^{(N)}(x)=\sum_{n=1}^N…
In this paper, we develop a novel analytic method to prove the prime number theorem in de la Vall\'ee Poussin's form: $$ \pi(x)=\operatorname{li}(x)+\mathcal O(xe^{-c\sqrt{\log x}}) $$ Instead of performing asymptotic expansion on Chebyshev…
Many large arithmetic computations rely on tables of all primes less than $n$. For example, the fastest algorithms for computing $n!$ takes time $O(M(n\log n) + P(n))$, where $M(n)$ is the time to multiply two $n$-bit numbers, and $P(n)$ is…
We present an algorithm that computes the product of two n-bit integers in O(n log n (4\sqrt 2)^{log^* n}) bit operations. Previously, the best known bound was O(n log n 6^{log^* n}). We also prove that for a fixed prime p, polynomials in…
We prove some results concerning the distribution of primes on the Riemann hypothesis. First, we prove the explicit result that there exists a prime in the interval $(x-\frac{4}{\pi} \sqrt{x} \log x,x]$ for all $x \geq 2$; this improves a…
In this paper we establish a new explicit upper and lower bound for the $n$-th prime number, which improve the currently best estimates given by Dusart in 2010. As the main tool we use some recently obtained explicit estimates for the prime…
We describe a new algorithm that computes the n-th Bernoulli number in n^(4/3 + o(1)) bit operations. This improves on previous algorithms that had complexity n^(2 + o(1)).
This paper describes a new median algorithm and a median approximation algorithm. The former has O(n) average running time and the latter has O(n) worst-case running time. These algorithms are highly competitive with the standard algorithm…
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…
Using inequalities of Rosser and Schoenfeld, we prove formulas for pi(n) and the n-th prime that involve only the elementary operations +,-,/ on integers, together with the floor function. Pascal Sebah has pointed out that the formula for…
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…
Explorable heap selection is the problem of selecting the $n$th smallest value in a binary heap. The key values can only be accessed by traversing through the underlying infinite binary tree, and the complexity of the algorithm is measured…