Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 5 years ago

Juanjo gravatar image

In addition to the workarounds pointed by @vdelecroix, you can use the following one:

sage: ZZ(p(11)).is_prime()
True

You can also use the is_pseudoprime function, which does not require a previous coercion to the integers ring:

sage: is_pseudoprime(p(11))
True

For n264, if is_pseudoprime(n) returns True, it is very likely, but not sure, that n is prime. For n<264, is_pseudoprime(n) is True if and only if n is prime.