#### DMCA

## The Pseudosquares Prime Sieve

### Cached

### Download Links

- [digitalcommons.butler.edu]
- [euclid.butler.edu]
- DBLP

### Other Repositories/Bibliography

Citations: | 4 - 3 self |

### Citations

1776 | The C++ Programming Language.
- Stroustrup
- 2000
(Show Context)
Citation Context ...ddressed either at the bit level or at the word level, where each machine word is composed of O(log n) bits. When we present code fragments, we use a C++ style that should be familiar to most readers =-=[25]-=-. We occasionally declare integer variables with an INT datatype instead of the int datatype. This indicates that these integers typically exceed 32 bits in practice and may require special implementa... |

1280 |
An Introduction to the Theory of Numbers
- Hardy, Wright
- 1975
(Show Context)
Citation Context ...1 + o(1)); (2) p≤x � 1=π(x)= p≤x x (1 + o(1)); log x � � � p − 1 1 = O ; p log x p≤x (3) (4) � 1 φ(m) = d m log(x2/x1)(1 + o(1)). (5) x 1 <d≤x 2 gcd(d,m)=1 For proofs of (1)–(4), see Hardy and Wright =-=[14]-=-. For a proof of (5), see [23, Lemma 1]. 2.5 The Wheel A wheel, as we will use it, is a data structure that encapsulates information about the integers relatively prime to the first k primes. Generall... |

255 |
Riemann’s hypothesis and test for primality.
- Miller
- 1976
(Show Context)
Citation Context ... factor with the 2-psp test, and another log n factor because in this paper we count arithmetic operations instead of bit operations.) WecanimprovethetimetoO(n(log n) 2 ) by using Miller’s prime test =-=[16]-=-, but then our output is correct only if the ERH is true. And of course if we are willing to accept probable primes, the Miller-Rabin [20] or Solovay-Strassen [22] tests could give us O(n log n) opera... |

234 |
Probabilistic algorithm for testing primality.
- Rabin
- 1980
(Show Context)
Citation Context ...animprovethetimetoO(n(log n) 2 ) by using Miller’s prime test [16], but then our output is correct only if the ERH is true. And of course if we are willing to accept probable primes, the Miller-Rabin =-=[20]-=- or Solovay-Strassen [22] tests could give us O(n log n) operations.Butinmostapplicationsforprimesieves, we need to be certain of our output. In this paper, we present a new prime number sieve, the ps... |

104 |
Algorithmic Number Theory,
- Bach, Shallit
- 1996
(Show Context)
Citation Context ...t φ(m) be the number of positive integers up to m that are relatively prime to m, with φ(1) = 1. The number of primes up to x is given by π(x). An integer x is a square, or quadratic residue, modulo p if there exists an integer r such that r2 ≡ x (mod p). We normally require that gcd(x, p) = 1. The pseudosquare Lp is the least non-square positive integer satisfying these two properties: 1. Lp ≡ 1 (mod 8), and 2. Lp is a quadratic residue modulo every odd prime q ≤ p. Thus L3 = 73 and L5 = 241. See Williams [25, §16.2]. We make use of the following estimates. Here x, x1, x2 > 0, and except for (5), all sums and products are only over primes.∑ p≤x 1 p = log log x + O(1); (1) ∑ p≤x log p = x(1 + o(1)); (2) ∑ p≤x 1 = π(x) = x log x (1 + o(1)); (3) ∏ p≤x p− 1 p = O ( 1 log x ) ; (4) ∑ x1<d≤x2 gcd(d,m)=1 1 d = φ(m) m log(x2/x1)(1 + o(1)). (5) For proofs of (1)–(4), see Hardy and Wright [13]. For a proof of (5), see [22, Lemma 1]. 2.3 The Wheel A wheel, as we will use it, is a data structure that encapsulates information about the integers relatively prime to the first k primes. Generally speaking, a wheel can often be used to reduce the running time of a prime number sieve by a factor propo... |

95 |
the GNU multiple precision arithmetic library. http://www.swox.com/gmp,
- Granlund
- 1991
(Show Context)
Citation Context ...instead of the int datatype. This indicates that these integers typically exceed 32 bits in practice and may require special implementation (we used the Gnu-MP mpz t datatype and associated functions =-=[13]-=-). We still limit INTs to O(log n) bits. The space used by an algorithm under our model is counted in bits. The space used by the output of a prime number sieve (the list of primes up to n) isnot coun... |

42 | Detecting perfect powers in essentially linear time,
- Bernstein
- 1998
(Show Context)
Citation Context ... are either prime or the power of a prime. Note that if n ≤ 6.4·10 37 , only primes remain and we are done [26, p. 417]. To remove the prime powers, in theory we use a perfect power testing algorithm =-=[6,7,9]-=- which, in our model of computation, requires sublinear time per integer on average, making the cost negligible (o(Δ) operations on average, since we only perform the tests on the remaining O(Δ/ log n... |

34 |
A Fast Monte Carlo Test for Primality,
- Solovay, Strassen
- 1978
(Show Context)
Citation Context ... n) 2 ) by using Miller’s prime test [16], but then our output is correct only if the ERH is true. And of course if we are willing to accept probable primes, the Miller-Rabin [20] or Solovay-Strassen =-=[22]-=- tests could give us O(n log n) operations.Butinmostapplicationsforprimesieves, we need to be certain of our output. In this paper, we present a new prime number sieve, the pseudosquares prime sieve (... |

31 |
Analytic Methods in the Analysis and Design of Number-Theoretic Algorithms,
- Bach
- 1985
(Show Context)
Citation Context ... then Algorithm PSSPS finds all primes up to n in O(n(log n) 2 / loglog n) arithmetic operations and O((log n) 3 / log log n) space.sThe Pseudosquares Prime Sieve 201 This follows from Bach’s Theorem =-=[3]-=-, which implies p<2(log n) 2 , or asymptotically p<(1 + o(1))(log n) 2 . Note that this weaker result still outperforms the use of Miller’s prime test [16] or AKS [1,8] in a prime sieve. Currently the... |

20 |
The pseudoprimes to 25
- Pomerance, Wagstaff
- 1980
(Show Context)
Citation Context ...eparately, we would only need O(log n) space, but the time of O(n √ n/ logn) would be prohibitive. We could sieve by a few primes, then apply a quick base-2 pseudoprime test to remove most composites =-=[17]-=- and then use a prime test. If we used the AKS test [1] with Bernstein’s complexity improvements [8], the result would be a sieve that takes n(log n) 2+o(1) operations. (The modified AKS test is (log ... |

18 | Prime sieves using binary quadratic forms.
- Atkin, Bernstein
- 2004
(Show Context)
Citation Context ...ation of the wheel datastructure. 1 Introduction A prime number sieve is an algorithm that finds all prime numbers up to a bound n. The fastest known sieves take O(n/ log log n) arithmetic operations =-=[2,10,18,23]-=-, which is quite fast, considering there are π(n) ∼ n/ logn primes to find. However in practice, the utility of a prime number sieve is often limited by how much memory space it needs. For example, a ... |

18 |
A sublinear additive sieve for finding prime numbers
- Pritchard
- 1981
(Show Context)
Citation Context ...ation of the wheel datastructure. 1 Introduction A prime number sieve is an algorithm that finds all prime numbers up to a bound n. The fastest known sieves take O(n/ log log n) arithmetic operations =-=[2,10,18,23]-=-, which is quite fast, considering there are π(n) ∼ n/ logn primes to find. However in practice, the utility of a prime number sieve is often limited by how much memory space it needs. For example, a ... |

18 | Édouard Lucas and Primality Testing, Canadian - Williams - 1998 |

15 | Some results on pseudosquares.
- Lukes, Patterson, et al.
- 1996
(Show Context)
Citation Context ...ve (Algorithm PSSPS), that uses very little space and yet is fast enough to be practical. It uses an Eratosthenes-like sieve followed by the pseudosquares prime test of Lukes, Patterson, and Williams =-=[15]-=- (which effectively includes a base-2 pseudoprime test). Our sieve has a conjectured running time of O(n log n) arithmetic operations and O((log n) 2 ) bits of space. This is the complexity we observe... |

12 |
Huel sbergen, Statistical evidence for small generating sets,
- Bach, L
- 1993
(Show Context)
Citation Context ...the following. Theorem 3.1. Let p be defined as above. Algorithm PSSPS finds all primes up to n using O(π(p)n)+o(n log n) arithmetic operations and O(π(p)logn) space. The work of Bach and Huelsbergen =-=[4]-=- implies the following conjecture. Conjecture 3.2. log Lp ∼ log 2 p 1 log p ,orequivalently,p∼log 2 log Lp log log Lp. Lukes, Patterson, and Williams [15] studied the relationship between Lp and p for... |

12 |
Two fast parallel prime number sieves.
- Sorenson, Parberry
- 1994
(Show Context)
Citation Context ...our C++ notation, we will declare W to be of class type Wheel(k),wherek is an integer parameter. We can construct a wheel of size Mk in O(Mk) operations. For examples of the wheel data structure, see =-=[19,24]-=-. 3 Algorithm PSSPS 3.1 Precomputations and Main Loop We first construct a table of pseudosquares up to n/(log n) 2 using the algorithm we describe later in §4. In the code fragment below, this is sto... |

12 | Edouard Lucas and primality testing. - Williams - 1998 |

11 | Detecting perfect powers by factoring into coprimes
- Bernstein, Lenstra, et al.
(Show Context)
Citation Context ... are either prime or the power of a prime. Note that if n ≤ 6.4·10 37 , only primes remain and we are done [26, p. 417]. To remove the prime powers, in theory we use a perfect power testing algorithm =-=[6,7,9]-=- which, in our model of computation, requires sublinear time per integer on average, making the cost negligible (o(Δ) operations on average, since we only perform the tests on the remaining O(Δ/ log n... |

10 |
Sieve algorithms for perfect power testing.
- Bach, Sorenson
- 1993
(Show Context)
Citation Context ... are either prime or the power of a prime. Note that if n ≤ 6.4·10 37 , only primes remain and we are done [26, p. 417]. To remove the prime powers, in theory we use a perfect power testing algorithm =-=[6,7,9]-=- which, in our model of computation, requires sublinear time per integer on average, making the cost negligible (o(Δ) operations on average, since we only perform the tests on the remaining O(Δ/ log n... |

8 |
Fast compact prime number sieves (among others
- Pritchard
- 1983
(Show Context)
Citation Context ...ering there are π(n) ∼ n/ logn primes to find. However in practice, the utility of a prime number sieve is often limited by how much memory space it needs. For example, a sieve that uses O( √ n)space =-=[2,19,23]-=- cannot, on current hardware, generate primes larger than about 10 18 . ⋆ This work was supported by a grant from the Holcomb Research Institute. Special thanks to Hugh Williams for helpful discussion... |

5 |
Dissecting a sieve to cut its need for space
- Galway
(Show Context)
Citation Context ...mproved this paper. F. Hess, S. Pauli, and M. Pohst (Eds.): ANTS 2006, LNCS 4076, pp. 193–207, 2006. c○ Springer-Verlag Berlin Heidelberg 2006s194 J.P. Sorenson Even with Galway’s clever improvements =-=[11]-=- to the Atkin-Bernstein sieve [2], the space requirement is still n 1/3+ɛ , giving an effective limit of roughly 10 27 . Galway also has a sieve with conjectured space use of O(n 1/4 ) that runs linea... |

5 |
Analytic computation of the prime-counting function, Ph.D.thesis,University of Illinois at Urbana-Champaign
- Galway
- 2001
(Show Context)
Citation Context ...ture may prove to be useful in other areas of computational number theory. For more on finding pseudosquares, see Wooding and Williams [28] in this volume. For recent work on prime number sieves, see =-=[2,11,12,23]-=-. The rest of this paper is organized as follows. In §2 we discuss some preliminaries, including pseudosquares, followed by a description of our algorithm in §3. In §4 we present our new wheel data st... |

3 |
Proving primality in essentially quartic time.
- Bernstein
- 2006
(Show Context)
Citation Context ... could sieve by a few primes, then apply a quick base-2 pseudoprime test to remove most composites [17] and then use a prime test. If we used the AKS test [1] with Bernstein’s complexity improvements =-=[8]-=-, the result would be a sieve that takes n(log n) 2+o(1) operations. (The modified AKS test is (log n) 4+o(1) bit operations; we save a log n factor with the 2-psp test, and another log n factor becau... |

3 | A space-efficient fast prime number sieve
- Dunten, Jones, et al.
(Show Context)
Citation Context ...ation of the wheel datastructure. 1 Introduction A prime number sieve is an algorithm that finds all prime numbers up to a bound n. The fastest known sieves take O(n/ log log n) arithmetic operations =-=[2,10,18,23]-=-, which is quite fast, considering there are π(n) ∼ n/ logn primes to find. However in practice, the utility of a prime number sieve is often limited by how much memory space it needs. For example, a ... |

3 | H.C.: Doubly-focused enumeration of pseudosquares and pseudocubes
- Wooding, Williams
- 2006
(Show Context)
Citation Context ...(n · exp[−c log n/ loglog n]) for a constant c>0. This data structure may prove to be useful in other areas of computational number theory. For more on finding pseudosquares, see Wooding and Williams =-=[28]-=- in this volume. For recent work on prime number sieves, see [2,11,12,23]. The rest of this paper is organized as follows. In §2 we discuss some preliminaries, including pseudosquares, followed by a d... |

2 |
Dissecting a sieve to cut its need for space. In Algorithmic number theory
- Galway
- 2000
(Show Context)
Citation Context ...is a new, spaceefficient implementation of the wheel datastructure. 1 Introduction A prime number sieve is an algorithm that finds all prime numbers up to a bound n. The fastest known sieves take O(n/ log log n) arithmetic operations [2, 10, 17, 22], which is quite fast, considering there are π(n) ∼ n/ log n primes to find. However in practice, the utility of a prime number sieve is often limited by how much memory space it needs. For example, a sieve that uses O( √ n) space [2, 18, 22] cannot, on current hardware, generate primes larger than about 1018. Even with Galway’s clever improvements [11] to the Atkin-Bernstein sieve [2], the space requirement is still n1/3+, giving an effective limit of roughly 1027. (Note that the space needed to write down the output, the primes up to n, is not included.) ? This work was supported by a grant from the Holcomb Research Institute If we applied trial division to each integer up to n separately, we would only need O(log n) space, but the time of O(n √ n/ log n) would be prohibitive. We could sieve by a few primes, then apply a quick base-2 pseudoprime test to remove most composites [16] and then use a prime test. If we used the AKS test [1] wit... |

1 |
On pseudosquares. New Trends in Prob
- Schinzel
- 1997
(Show Context)
Citation Context ...t this weaker result still outperforms the use of Miller’s prime test [16] or AKS [1,8] in a prime sieve. Currently the best unconditional result is p ≤ Lp 1/(4√ e−ɛ) ≈ Lp 0.1516... , due to Schinzel =-=[21]-=-. Since we use Lp ≈ n/p, we obtain that p ≈ n 1/(4√ e+1−ɛ) ≈ n 0.132 . This implies the following much weaker result: Corollary 3.5. Let ɛ>0. Algorithm PSSPS finds all primes up to n in O(n 1+1/(4√ e+... |

1 | Trading time for space in prime number sieves
- Sorenson
- 1998
(Show Context)
Citation Context |

1 | Development of a high-speed hybrid sieve architecture - Wooding - 2003 |