Related papers: Two Algorithms to Find Primes in Patterns
Permutation patterns and pattern avoidance have been intensively studied in combinatorics and computer science, going back at least to the seminal work of Knuth on stack-sorting (1968). Perhaps the most natural algorithmic question in this…
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…
Permutation patterns and pattern avoidance have been intensively studied in combinatorics and computer science, going back at least to the seminal work of Knuth on stack-sorting (1968). Perhaps the most natural algorithmic question in this…
Let $\epsilon\in \{-1,1\}$. A sequence of prime numbers $p_1, p_2, p_3, ...$, such that $p_i=2p_{i-1}+\epsilon$ for all $i$, is called a {\it Cunningham chain} of the first or second kind, depending on whether $\epsilon =1$ or -1…
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…
We consider a class of pattern matching problems where a normalising transformation is applied at every alignment. Normalised pattern matching plays a key role in fields as diverse as image processing and musical information processing…
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 consider the following problem: Given a rational matrix $A \in \setQ^{m \times n}$ and a rational polyhedron $Q \subseteq\setR^{m+p}$, decide if for all vectors $b \in \setR^m$, for which there exists an integral $z \in \setZ^p$ such…
For almost 35 years, Sch{\"o}nhage-Strassen's algorithm has been the fastest algorithm known for multiplying integers, with a time complexity O(n $\times$ log n $\times$ log log n) for multiplying n-bit inputs. In 2007, F{\"u}rer proved…
We establish the existence of infinitely many \emph{polynomial} progressions in the primes; more precisely, given any integer-valued polynomials $P_1, >..., P_k \in \Z[\m]$ in one unknown $\m$ with $P_1(0) = ... = P_k(0) = 0$ and any $\eps…
Let $I_k = [(2k-1)^2, (2k+1)^2)$ for $k \geq 1$. Starting from the odd-composite matrix $(b_{ij})$ with $b_{ij} = (2i-1)(2j-1)$, introduced by the author in [1], we define for each odd integer $n$ the \emph{matrix multiplicity} $r(n)$, the…
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…
Given a set $\Pi$ of permutation patterns of length at most $k$, we present an algorithm for building $S_{\le n}(\Pi)$, the set of permutations of length at most $n$ avoiding the patterns in $\Pi$, in time $O(|S_{\le n - 1}(\Pi)| \cdot k +…
We analyze algorithms for computing the $n$th prime $p_n$ and establish asymptotic bounds for several approaches. Using existing results on the complexity of evaluating the prime-counting function $\pi(x)$, we show that the binary search…
Fast algorithms for integer and polynomial multiplication play an important role in scientific computing as well as in other disciplines. In 1971, Sch{\"o}nhage and Strassen designed an algorithm that improved the multiplication time for…
A trie $\mathcal{T}$ is a rooted tree such that each edge is labeled by a single character from the alphabet, and the labels of out-going edges from the same node are mutually distinct. Given a trie $\mathcal{T}$ with $n$ edges, we show how…
We consider the well-studied pattern counting problem: given a permutation $\pi \in \mathbb{S}_n$ and an integer $k > 1$, count the number of order-isomorphic occurrences of every pattern $\tau \in \mathbb{S}_k$ in $\pi$. Our first result…
In this expository paper we describe four primality tests. The first test is very efficient, but is only capable of proving that a given number is either composite or 'very probably' prime. The second test is a deterministic polynomial time…
We study values of k for which the interval (kn,(k+1)n) contains a prime for every n>1. We prove that the list of such integers k includes k=1,2,3,5,9,14, and no others, at least for k<=50,000,000. For every known k of this list, we give a…
We speculate on the distribution of primes in exponentially growing, linear recurrence sequences $(u_n)_{n\geq 0}$ in the integers. By tweaking a heuristic which is successfully used to predict the number of prime values of polynomials, we…