4 @var{prime:prngs} is the random-state (@pxref{Random Numbers}) used by these
5 procedures. If you call these procedures from more than one thread
6 (or from interrupt), @code{random} may complain about reentrant
9 @emph{Note:} The prime test and generation procedures implement (or
10 use) the Solovay-Strassen primality test. See
13 @item Robert Solovay and Volker Strassen,
14 @cite{A Fast Monte-Carlo Test for Primality},
15 SIAM Journal on Computing, 1977, pp 84-85.
19 @defun jacobi-symbol p q
21 Returns the value (+1, @minus{}1, or 0) of the Jacobi-Symbol of
22 exact non-negative integer @var{p} and exact positive odd integer @var{q}.
27 @var{prime:trials} the maxinum number of iterations of Solovay-Strassen that will
28 be done to test a number for primality.
33 Returns @code{#f} if @var{n} is composite; @code{#t} if @var{n} is prime.
34 There is a slight chance @code{(expt 2 (- prime:trials))} that a
35 composite will return @code{#t}.
38 @defun primes< start count
40 Returns a list of the first @var{count} prime numbers less than
41 @var{start}. If there are fewer than @var{count} prime numbers
42 less than @var{start}, then the returned list will have fewer than
46 @defun primes> start count
48 Returns a list of the first @var{count} prime numbers greater than @var{start}.
53 Returns a list of the prime factors of @var{k}. The order of the
54 factors is unspecified. In order to obtain a sorted list do
55 @code{(sort! (factor @var{k}) <)}.