All Topics  
Fermat number

 

   Email Print
   Bookmark   Link






 

Fermat number



 
 
In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a Fermat number, named after Pierre de Fermat
Pierre de Fermat

Pierre de Fermat was a France lawyer at the Parlement of Toulouse, France, and a mathematician who is given credit for early developments that led to modern calculus....
 who first studied them, is a positive integer
Natural number

In mathematics, a natural number can mean either an element of the Set = *n = = ? = ? ...
 of the form

where n is a nonnegative integer. The first nine Fermat numbers are :



, only F0 to F11 have been completely factored
Integer factorization

In number theory, integer factorization is the breaking down of a composite number into smaller non-trivial divisors, which when multiplied together equal the original integer....
.

If 2n + 1 is prime
Prime number

In mathematics, a prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. An infinitude of prime numbers exists, as demonstrated by Euclid around 300 BC....
, and n > 0, it can be shown that n must be a power of two.






Discussion
Ask a question about 'Fermat number'
Start a new discussion about 'Fermat number'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, a Fermat number, named after Pierre de Fermat
Pierre de Fermat

Pierre de Fermat was a France lawyer at the Parlement of Toulouse, France, and a mathematician who is given credit for early developments that led to modern calculus....
 who first studied them, is a positive integer
Natural number

In mathematics, a natural number can mean either an element of the Set = *n = = ? = ? ...
 of the form

where n is a nonnegative integer. The first nine Fermat numbers are :

F0 = 21
1 =3 
F1 = 22
1 =5 
F2 = 24
1 =17 
F3 = 28
1 =257 
F4 = 216
1 =65,537 
F5 = 232
1 =4,294,967,297 
=641 × 6,700,417
F6 = 264
1 =18,446,744,073,709,551,617 
=274,177 × 67,280,421,310,721
F7 = 2128
1 =340,282,366,920,938,463,463,374,607,431,768,211,457 
=59,649,589,127,497,217 × 5,704,689,200,685,129,054,721
F8 = 2256
1 =115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,937 
=1,238,926,361,552,897 × 93,461,639,715,357,977,769,163,558,199,606,896,584,051,237,541,638,188,580,280,321


, only F0 to F11 have been completely factored
Integer factorization

In number theory, integer factorization is the breaking down of a composite number into smaller non-trivial divisors, which when multiplied together equal the original integer....
.

If 2n + 1 is prime
Prime number

In mathematics, a prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. An infinitude of prime numbers exists, as demonstrated by Euclid around 300 BC....
, and n > 0, it can be shown that n must be a power of two. (If n = ab where 1 = a, b = n and b is odd, then 2n + 1 = (2a)b + 1 = (−1)b + 1 = 0 (mod 2a + 1). See below for complete proof.) In other words, every prime of the form 2n + 1 is a Fermat number, and such primes are called Fermat primes. The only known Fermat primes are F0, F1, F2, F3, and F4.

Basic properties


The Fermat numbers satisfy the following recurrence relation
Recurrence relation

In mathematics, a recurrence relation is an equation that defines a sequence recursion: each term of the sequence is defined as a Function of the preceding terms....
s

for n = 2. Each of these relations can be proved by mathematical induction
Mathematical induction

Mathematical induction is a method of mathematical proof typically used to establish that a given statement is true of all natural numbers. It is done by proving that the first statement in the infinite sequence of statements is true, and then proving that if any one statement in the infinite sequence of statements is true, then...
. From the last equation, we can deduce Goldbach's theorem: no two Fermat numbers share a common factor
Coprime

In mathematics, the integers a and b are said to be coprime or relatively prime if they have no common divisor other than 1 or, equivalently, if their greatest common divisor is 1....
. To see this, suppose that 0 = i < j and Fi and Fj have a common factor a > 1. Then a divides both

and Fj; hence a divides their difference 2. Since a > 1, this forces a = 2. This is a contradiction
Contradiction

In classical logic, a contradiction consists of a logical incompatibility between two or more propositions. It occurs when the propositions, taken together, yield two logical consequences which form the logical inversions of each other....
, because each Fermat number is clearly odd. As a corollary
Corollary

A corollary is a statement which follows readily from a previously proven statement. In mathematics a corollary typically follows a theorem. The use of the term corollary, rather than proposition or theorem, is intrinsically subjective....
, we obtain another proof of the infinitude
Infinity

Infinity comes from the Latin infinitas or "unboundedness." It refers to several distinct concepts – usually linked to the idea of "without end" – which arise in philosophy, mathematics, and theology....
 of the prime numbers: for each Fn, choose a prime factor pn; then the sequence is an infinite sequence of distinct primes.

Further properties:

  • The number of digits D(n,b) of Fn expressed in the base
    Numeral system

    A numeral system is a writing system for expressing numerals , and a mathematical notation for representing numbers of a given set, using graphemes or symbols in a consistent manner....
     b is


(See floor function
Floor function

In mathematics and computer science, the floor and ceiling function s map a real number to the next smallest or next largest integer. More precisely, floor is the largest integer not greater than x and ceiling is the smallest integer not less than x....
)

  • No Fermat number can be expressed as the sum of two primes
    Prime number

    In mathematics, a prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. An infinitude of prime numbers exists, as demonstrated by Euclid around 300 BC....
    , with the exception of F1 = 2 + 3.
  • No Fermat prime can be expressed as the difference of two pth powers, where p is an odd prime.


  • The sum of the reciprocals of all the Fermat numbers is irrational
    Irrational number

    In mathematics, an irrational number is any real number that is not a rational number ? that is, it is a number which cannot be expressed as a fraction m/n, where m and n are integers, with n non-zero....
    . (Solomon W. Golomb
    Solomon W. Golomb

    Solomon Wolf Golomb is a mathematician and engineer, a professor of electrical engineering at the University of Southern California best known to the general public and fans of mathematical games as the inventor of polyominoes, the inspiration for the computer game Tetris....
    , 1963)


Primality of Fermat numbers


Fermat numbers and Fermat primes were first studied by Pierre de Fermat, who conjecture
Conjecture

In mathematics, a conjecture is a mathematical statement which appears resourceful, but has not been formally proven to be true under the rules of mathematical logic....
d that all Fermat numbers are prime. Indeed, the first five Fermat numbers F0,...,F4 are easily shown to be prime. However, this conjecture was refuted by Leonhard Euler
Leonhard Euler

Leonhard Paul Euler was a pioneering Swiss mathematician and physicist who spent most of his life in Russia and Germany.Euler made important discoveries in fields as diverse as calculus and graph theory....
 in 1732 when he showed that

Euler proved that every factor of Fn must have the form k2n+1 + 1. For n = 5, this means that the only possible factors are of the form 64k + 1. Euler found the factor 641 = 10×64 + 1.

It is widely believed that Fermat was aware of the form of the factors later proved by Euler, so it seems curious why he failed to follow through on the straightforward calculation to find the factor. One common explanation is that Fermat made a computational mistake and was so convinced of the correctness of his claim that he failed to double-check his work.

There are no other known Fermat primes Fn with n > 4. However, little is known about Fermat numbers with large n. In fact, each of the following is an open problem:

  • Is Fn composite
    Composite number

    A composite number is a negative and non-negative numbers integer which has a positive divisor other than one or itself. In other words, if 0 < n is an integer and there are integers 1 < a, b < n such that n = a ? b then n is composite....
     for all n > 4?
  • Are there infinitely many Fermat primes? (Eisenstein
    Ferdinand Eisenstein

    Ferdinand Gotthold Max Eisenstein was a Germany mathematician. He specialized in number theory and mathematical analysis, and proved several results that eluded even Carl Friedrich Gauss....
     1844)
  • Are there infinitely many composite Fermat numbers?


The following heuristic argument
Heuristic argument

A heuristic argument is an argument that reasons from the value of a method or principle that has been shown by experimental investigation to be a useful aid in learning, discovery and problem-solving....
 suggests there are only finitely many Fermat primes: according to the prime number theorem
Prime number theorem

In number theory, the prime number theorem describes the asymptotic analysis distribution of the prime numbers. The prime number theorem gives a rough description of how the primes are distributed....
, the "probability
Probability

Probability, or wikt:chance, is a way of expressing knowledge or belief that an Event will occur or has occurred. In mathematics the concept has been given an exact meaning in probability theory, that is used extensively in such areas of study as mathematics, statistics, finance, gambling, science, and philosophy to draw conclusions about t...
" that a number n is prime is at most A/ln(n), where A is a fixed constant. Therefore, the total expected number
Expected value

In probability theory and statistics, the expected value of a random variable is the Lebesgue integral of the random variable with respect to its probability measure....
 of Fermat primes is at most



It should be stressed that this argument is in no way a rigorous proof
Mathematical proof

In mathematics, a proof is a convincing demonstration that some mathematical statement is necessarily true. Proofs are obtained from deductive reasoning, rather than from inductive reasoning or empirical arguments....
. For one thing, the argument assumes that Fermat numbers behave "randomly
Randomness

Randomness is a lack of order, purpose, Causality, or predictability. Randomness as defined by Aristotle is the situation, when a choice is to be made which has no logical component by which to determine or make the choice ....
", yet we have already seen that the factors of Fermat numbers have special properties. If (more sophisticatedly) we regard the conditional probability that n is prime, given that we know all its prime factors exceed B, as at most Aln(B)/ln(n), then using Euler's theorem that the least prime factor of Fn exceeds 2n+1, we would find instead



Although such arguments engender the belief that there are only finitely many Fermat primes, one can also produce arguments for the opposite conclusion. Suppose we regard the conditional probability that n is prime, given that we know all its prime factors are 1 modulo M, as at least CM/ln(n). Then using Euler's result that M=2n+1 we would find that the expected total number of Fermat primes was at least



and indeed this argument predicts that an asymptotically constant fraction of Fermat numbers are prime!

it is known that Fn is composite for 5 = n = 32, although complete factorizations of Fn are known only for 0 = n = 11, and there are no known factors for n in . The largest Fermat number known to be composite is F2478782, and its prime factor 3×22478785 + 1 was discovered by John B. Cosgrave
John B. Cosgrave

Dr. John B. Cosgrave is an Irish mathematician specialising in number theory. He is best known for his series of discoveries in mathematics, including a new, 2000-digit prime number in 1999 and a record composite Fermat numbers in 2003....
 and his Proth-Gallot Group on October 10 2003.

There are a number of conditions that are equivalent
If and only if

If and only if, in logic and fields that rely on it such as mathematics and philosophy, is a biconditional logical connective between statements....
 to the primality of Fn.

  • Proth's theorem
    Proth's theorem

    In number theory, Proth's theorem is a primality test for Proth numbers.It states that if p is a Proth number, of the form k2n + 1 with k odd and k n, then if for some integer a,...
     -- (1878) Let N = k2m + 1 with odd k < 2m. If there is an integer a such that




then N is prime. Conversely, if the above congruence does not hold, and in addition


(See Jacobi symbol
Jacobi symbol

The Jacobi symbol is a generalization of the Legendre symbol introduced by Carl Gustav Jakob Jacobi in 1837. It is of theoretical interest in modular arithmetic and other branches of number theory, but its main use is in computational number theory, especially primality testing and integer factorization; these in turn are important in cryptog...
)

then N is composite. If N = Fn > 3, then the above Jacobi symbol is always equal to −1 for a = 3, and this special case of Proth's theorem is known as Pépin's test
Pépin's test

In mathematics, P?pin's test is a primality test, which can be used to determine whether a Fermat number is prime number. It is a variant of Proth's theorem....
. Although Pépin's test and Proth's theorem have been implemented on computers to prove the compositeness of many Fermat numbers, neither test gives a specific nontrivial factor. In fact, no specific prime factors are known for n = 14, 20, 22, and 24.
  • Let n = 3 be a positive odd integer. Then n is a Fermat prime if and only if for every a co-prime to n, a is a primitive root
    Primitive root modulo n

    In modular arithmetic, a branch of number theory, a primitive root modulo n is any number g with the property that any number coprime to n is congruent to a power of g ....
     mod n if and only if a is a quadratic nonresidue
    Quadratic residue

    An integer q is called a quadratic residue modular arithmetic n if it is Congruence relation to a perfect square ; i.e., if there exists an integer x such that:...
     mod n.
  • The Fermat number Fn > 3 is prime if and only if it can be written uniquely as a sum of two nonzero squares, namely




When not of the form shown above, a proper factor is:




Example 1: F5 = 622642 + 204492, so a proper factor is .


Example 2: F6 = 40468032562 + 14387937592, so a proper factor is .


Factorization of Fermat numbers


Because of the size of Fermat numbers, it is difficult to factorize or to prove primality of those. Pépin's test
Pépin's test

In mathematics, P?pin's test is a primality test, which can be used to determine whether a Fermat number is prime number. It is a variant of Proth's theorem....
 is a necessary and sufficient test for primality of Fermat numbers which can be implemented by modern computers. The elliptic curve method is a fast method for finding small prime divisors of numbers. Distributed computing project Fermatsearch has successfully found some factors of Fermat numbers. Yves Gallot's proth.exe has been used to find factors of large Fermat numbers. Edouard Lucas
Edouard Lucas

Fran?ois ?douard Anatole Lucas was a France mathematician. Lucas is known for his study of the Fibonacci sequence. The related Lucas sequence is named after him....
 proved in 1878 that every factor of Fermat number , with n at least 2, is of the form , where k is a positive integer; this is in itself almost sufficient to prove the primality of the known Fermat primes.

Pseudoprimes and Fermat numbers

Like composite number
Composite number

A composite number is a negative and non-negative numbers integer which has a positive divisor other than one or itself. In other words, if 0 < n is an integer and there are integers 1 < a, b < n such that n = a ? b then n is composite....
s of the form 2p - 1, every composite Fermat number is a strong pseudoprime
Strong pseudoprime

In number theory, a strong pseudoprime is a composite number that passes a pseudoprimality test. All primes pass this test, but a small fraction of composites pass as well, making them "pseudoprime"....
 to base 2. Because all strong pseudoprimes to base 2 are also Fermat pseudoprimes - ie.

for all Fermat numbers.

Because it is generally believed that all but the first few Fermat numbers are composite, this makes it possible to generate infinitely many strong pseudoprimes to base 2 from the Fermat numbers.

In fact, Rotkiewicz showed in 1964 that the product of any number of prime or composite Fermat numbers will be a Fermat pseudoprime to base 2.

Other theorems about Fermat numbers


Lemma: If n is a positive integer,

proof:


Theorem: If is prime, then is zero or a power of 2.

proof:

For , equals prime number 2. (This is why some sources count 2 as a sixth Fermat prime.)

If is a positive integer but not a power of 2, then where , and is odd.

By the preceding lemma, for positive integer ,

where means "evenly divides". Substituting , , and ,

and thus

Because , is not prime when is a positive integer that is not a power of 2.

A theorem of Édouard Lucas
Edouard Lucas

Fran?ois ?douard Anatole Lucas was a France mathematician. Lucas is known for his study of the Fibonacci sequence. The related Lucas sequence is named after him....
: Any prime divisor p of Fn = is of the form whenever n is greater than one.


sketch of proof:

Let Gp denote the group of non-zero elements of the integers (mod p) under multiplication, which has order p-1. Notice that 2 (strictly speaking, its image (mod p)) has multiplicative order in Gp, so that, by Lagrange's theorem
Lagrange's theorem (group theory)

Lagrange's theorem, in the mathematics of group theory, states that for any finite group G, the order of every subgroup H of G divides the order of G....
, p-1 is divisible by and p has the form for some integer k, as Euler knew. Édouard Lucas went further. Since n is greater than 1, the prime p above is congruent to 1 (mod 8). Hence (as was known to Carl Friedrich Gauss
Carl Friedrich Gauss

Johann Carl Friedrich Gauss. was a Germans mathematician and scientist who contributed significantly to many fields, including number theory, statistics, mathematical analysis, Differential geometry and topology, geodesy, electrostatics, astronomy and optics....
), 2 is a quadratic residue
Quadratic residue

An integer q is called a quadratic residue modular arithmetic n if it is Congruence relation to a perfect square ; i.e., if there exists an integer x such that:...
 (mod p), that is, there in integer a such that a2 -2 is divisible by p. Then the image of a has order in the group Gp and (using Lagrange's theorem again), p-1 is divisible by and p has the form for some integer s.

In fact, it can be seen directly that 2 is a quadratic residue (mod p), since (mod p). Since an odd power of 2 is a quadratic residue (mod p), so is 2 itself.

Relationship to constructible polygons


An n-sided regular polygon can be constructed with compass and straightedge
Compass and straightedge

Compass-and-straightedge or ruler-and-compass construction is the construction of lengths or angles using only an Idealization ruler and Compass ....
 if and only if n is the product of a power of 2 and distinct Fermat primes. In other words, if and only if n is of the form n = 2kp1p2ps, where k is a nonnegative integer and the pi are distinct Fermat primes. See constructible polygon
Constructible polygon

In mathematics, a constructible polygon is a regular polygon that can be Compass and straightedge constructions. For example, a regular pentagon is constructible with compass and straightedge while a regular heptagon is not....
.

A positive integer n is of the above form if and only if f(n) is a power of 2, where f(n) is Euler's totient function
Euler's totient function

In number theory, the totient of a positive integer n is defined to be the number of positive integers less than or equal to n that are coprime to n....
.

Applications of Fermat numbers


Pseudorandom Number Generation


Fermat primes are particularly useful in generating pseudo-random sequences of numbers in the range 1 … N, where N is a power of 2. The most common method used is to take any seed value between 1 and P - 1, where P is a Fermat prime. Now multiply this by a number A, which is greater than the square root of P and is a primitive root
Primitive root modulo n

In modular arithmetic, a branch of number theory, a primitive root modulo n is any number g with the property that any number coprime to n is congruent to a power of g ....
 modulo P (i.e., it is not a quadratic residue
Quadratic residue

An integer q is called a quadratic residue modular arithmetic n if it is Congruence relation to a perfect square ; i.e., if there exists an integer x such that:...
). Then take the result modulo P. The result is the new value for the RNG.
(see Linear congruential generator
Linear congruential generator

A linear congruential generator represents one of the oldest and best-known pseudorandom number generator algorithms. The theory behind them is easy to understand, and they are easily implemented and fast....
, RANDU
RANDU

RANDU is an infamous linear congruential generator pseudorandom number generator of the Park?Miller random number generator, which has been used since the 1960s....
)
This is useful in computer science since most data structures have members with 2X possible values. For example, a byte has 256 (28) possible values (0–255). Therefore to fill a byte or bytes with random values a random number generator which produces values 1–256 can be used, the byte taking the output value - 1. Very large Fermat primes are of particular interest in data encryption for this reason. This method produces only pseudorandom values as, after P - 1 repetitions, the sequence repeats. A poorly chosen multiplier can result in the sequence repeating sooner than P - 1.

Other interesting facts

A Fermat number cannot be a perfect number or part of a pair of amicable numbers.(Luca 2000)

The series of reciprocals of all prime divisors of Fermat numbers is convergent
Convergent series

In mathematics, a series is the summation of the terms of a sequence of numbers.Given a sequence , the nth partial sum is the sum of the first n terms of the sequence, that is,...
.(Krizek, Luca, Somer 2002)

If nn + 1 is prime, there exists an integer m such that n = 22m. The equation nn + 1 = F(2m+m) holds at that time.

Let the largest prime factor of Fermat number Fn be P(Fn). Then, (Grytczuk, Luca and Wojtowicz, 2001)

A Fermat prime cannot also be a Wieferich prime
Wieferich prime

In number theory, a Wieferich prime is a prime number p such that p2 divides 2p − 1 − 1; compare this with Fermat's little theorem, which states that every odd prime p divides 2p − 1  − 1....
. (Luca)

Generalized Fermat numbers

Numbers of the form , where a > 1 are called generalized Fermat numbers. By analogy with the ordinary Fermat numbers, it is common to write generalized Fermat numbers of the form as Fn(a). In this notation, for instance, the number 100,000,001 would be written as F3(10)

An odd prime p is a generalized Fermat number if and only if p is congruent to 1 ( mod 4).

Generalized Fermat primes

Because of the ease of proving their primality, generalized Fermat primes have become in recent years a hot topic for research within the field of number theory. Many of the largest known primes today are generalized Fermat primes.

Generalized Fermat numbers can be prime only for even
Even

GeneralEven may refer to:* Even , a Scandinavian male personal name .* Even , an ethnic group from Siberia and Russian Far East**Even language, a language spoken by the Evens...
 a, because if a is odd then every generalized Fermat number will be divisible by 2. By analogy with the heuristic argument
Heuristic argument

A heuristic argument is an argument that reasons from the value of a method or principle that has been shown by experimental investigation to be a useful aid in learning, discovery and problem-solving....
 for the finite number of primes among the base-2 Fermat numbers, it is to be expected that there will be only finitely many generalized Fermat primes for each even base. The smallest prime number Fn(a) with n > 4 is F5(30), or 3032+1.

A more elaborate theory can be used to predict the number of bases for which Fn(a) will be prime for a fixed n. The number of generalized Fermat primes can be roughly expected to halve as n is increased by 1.

See also

  • Mersenne prime
    Mersenne prime

    In mathematics, a Mersenne number is a positive integer that is one less than a power of two:Some definitions of Mersenne numbers require that the exponent n be prime....
  • Lucas' theorem
    Lucas' theorem

    In number theory, the Lucas' theorem states the following:Let m and n be non-negative integers, p a prime number, andandbe the base p expansions of m and n respectively....
  • Proth's theorem
    Proth's theorem

    In number theory, Proth's theorem is a primality test for Proth numbers.It states that if p is a Proth number, of the form k2n + 1 with k odd and k n, then if for some integer a,...
  • Pseudoprime
    Pseudoprime

    A pseudoprime is a probable prime which is not actually prime. Pseudoprimes can be classified according to which property they satisfy.The most important class of pseudoprimes come from Fermat's little theorem and hence are called Fermat pseudoprimes....
  • Primality test
    Primality test

    A primality test is an algorithm for determining whether an input number is prime number. Amongst other fields of mathematics, it is used for cryptography....
  • Constructible number
    Constructible number

    A point in the Euclidean plane is a constructible point if, given a fixed coordinate system , the point can be constructed with Compass and straightedge constructions....
  • Sierpinski number
    Sierpinski number

    In number theory, a Sierpinski number is an odd natural number k such that integers of the form k2n + 1 are composite number for all natural numbers n....
  • Sylvester's sequence
    Sylvester's sequence

    In number theory, Sylvester's sequence is a sequence of integers in which each member of the sequence is the product of the previous members, plus one....
  • Double exponential function
    Double exponential function

    A double exponential function is a constant raised to the power of an exponential function. The general formula is , which grows even faster than an exponential function....


External links

Sequence of Fermat numbers at OEIS
On-Line Encyclopedia of Integer Sequences

The On-Line Encyclopedia of Integer Sequences , also cited simply as Sloane's, is an extensive searchable database of integer sequences, freely available on the World Wide Web....
.
  • Chris Caldwell, at The Prime Pages
    Prime pages

    The Prime Pages is a website about prime numbers maintained by Prof. Chris Caldwell at the University of Tennessee at University of Tennessee at Martin....
    .
  • Luigi Morelli,
  • John Cosgrave,
  • Wilfrid Keller,
  • Yves Gallot,
  • Mark S. Manasse, (original announcement)