1 | initial version |

The `next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

A prime number is pseudoprime and "most" non-prime numbers are not pseudoprime. The benefit of such function is, as you noticed, checking that a number is pseudoprime is much faster than checking that a number is prime.

2 | No.2 Revision |

The `next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

A prime number is pseudoprime and "most" non-prime numbers are not pseudoprime. The benefit of such function is, as you noticed, checking that a number is pseudoprime is much faster than checking that a number is prime.

According to the doc, `next_prime`

*proves* that the returned number is actually a prime number by default, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet according to the doc (and no such number $\leq 2^64$ exist).

3 | No.3 Revision |

The `next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

A prime number is pseudoprime and "most" non-prime numbers are not pseudoprime. The benefit of such function is, as you noticed, checking that a number is pseudoprime is much faster than checking that a number is prime.

According to the doc, `next_prime`

*proves* that the returned number is actually a prime number by default, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet according to the doc (and no such number $\leq ~~2^64$ ~~2^{64}$ exist).

4 | No.4 Revision |

`next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

According to the doc, `next_prime`

*proves* that the returned number is actually a prime number by default, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet ~~according ~~(according to the ~~doc (and ~~doc), and no such number $\leq 2^{64}$ ~~exist).~~exist.

5 | No.5 Revision |

`next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

According to the doc, by default `next_prime`

*proves* that the returned number is actually a prime ~~number by default, ~~number, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet (according to the doc), and no such number $\leq 2^{64}$ exist.

6 | No.6 Revision |

`next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

According to the Sage doc, by default `next_prime`

*proves* that the returned number is actually a prime number, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet (according to the doc), and no such number $\leq 2^{64}$ exist.

7 | No.7 Revision |

`next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

According to the Sage doc, by default `next_prime`

*proves* that the returned number is actually a prime number, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet (according to the doc), and no such number $\leq 2^{64}$ exist.

8 | No.8 Revision |

`next_prime`

function relies on `nextprime`

from `PARI`

, which finds the next *pseudoprime* number as defined on the page https://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html#se:ispseudoprime

According to the Sage doc, by default `next_prime`

*proves* that the returned number is actually a prime number, which is not the case for `next_probable_prime`

, though no example of a probable prime that is not a genuine prime was found yet (according to the doc), and no such number $\leq 2^{64}$ exist.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.