nth Fermat number
(optional) non-negative integer
(optional) unassigned variable
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[IthFermat] instead.
The nth Fermat number is 22n+1.
fermat(n) returns the nth Fermat number, for n<22.
For any non-negative integer n and unassigned variable w, the function call fermat(n, w) assigns to w the information which is known (at the time of writing this function) about the Fermat number fermat(n). This information consists of: the primality character of fermat(n) (prime, composite, or unknown), and, if it is composite, any known prime factors.
Every factor of a Fermat number fermat(n) has the form 2n+2⁢k+1,2≤k.
If fermat is invoked with no arguments, it returns a list of all Fermat numbers whose primality status is known as of the time when this function was written.
The command with(numtheory,fermat) allows the use of the abbreviated form of this command.
it is prime
it is completely factored ,28⁢32⁢7⁢17+1⁢28⁢5⁢47⁢373⁢2998279+1
object too big
it has these prime factors ,233⁢127589+1,232⁢149041+1
it has this prime factor ,19⁢29450+1
Download Help Document
What kind of issue would you like to report? (Optional)