Math 2.0

Number theory Proof

Proof that if 2^n + 1 is prime then n is a power of 2

Builds on Prime numberFermat numberFundamental theorem of arithmeticDivisibility

Proof

We prove the contrapositive: if nn is not a power of 22, then 2n+12^n + 1 is not prime.

  1. Let nn be a positive integer. By the fundamental theorem of arithmetic, n=2kmn = 2^k m with k≥0k \ge 0 and mm a positive odd integer.
  2. Assume nn is not a power of 22. Then m≠1m \ne 1, so m≥3m \ge 3.
  3. Put x=22kx = 2^{2^k}, so that 2n+1=xm+12^n + 1 = x^m + 1 and x≥2x \ge 2.
  4. For odd mm, (x+1)(xm−1−xm−2+⋯−x+1)=xm+1(x + 1)(x^{m-1} - x^{m-2} + \dots - x + 1) = x^m + 1. Indeed, the product is ∑i=0m−1(−1)m−1−i(xi+1+xi)\sum_{i=0}^{m-1} (-1)^{m-1-i} (x^{i+1} + x^i), which telescopes to xm+(−1)m−1=xm+1x^m + (-1)^{m-1} = x^m + 1.
  5. So x+1x + 1 divides 2n+12^n + 1.
  6. We have x+1≥3>1x + 1 \ge 3 > 1. Also x+1<xm+1x + 1 < x^m + 1, because x≥2x \ge 2 and m≥3m \ge 3 give xm>xx^m > x.
  7. So 2n+12^n + 1 has a divisor strictly between 11 and itself, and it is not a prime number.
  8. By contraposition, if 2n+12^n + 1 is prime, then n=2kn = 2^k for a natural number kk.
  9. Then 2n+1=22k+12^n + 1 = 2^{2^k} + 1, which is the Fermat number FkF_k. So every prime of the form 2n+12^n + 1 with n≥1n \ge 1 is a Fermat number.

Idea

An odd factor m>1m > 1 of the exponent lets us factor ym+1y^m + 1 by y+1y + 1, because −1-1 is a root of ym+1y^m + 1 when mm is odd. This gives a proper divisor. So only exponents with no odd factor, the powers of 22, can give primes.

Reading path

To understand this page from the ground up, read these 36 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of the generalized Euclid's lemma, Proof of the commutativity of addition by induction, Proof of Euclid's lemma, Proof of strong induction from ordinary induction, Proof of the fundamental theorem of arithmetic, Proof of the existence of prime factorization, Proof of the well-ordering principle from strong induction, Proof of the division algorithm, Proof of the existence of a prime divisor.

Show the path as a graph
Definition by recursion, concept, no evidence levelDefinition by recursi…conceptDivisibility, definition, no evidence levelDivisibilitydefinitionFermat number, definition, no evidence levelFermat numberdefinitionMathematical induction, concept, no evidence levelMathematical inductionconceptNatural numbers, object, no evidence levelNatural numbersobjectPeano axioms, concept, no evidence levelPeano axiomsconceptGreatest common divisor, definition, no evidence levelGreatest common divis…definitionPrime number, definition, no evidence levelPrime numberdefinitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionCoprime integers, definition, no evidence levelCoprime integersdefinitionPrime factorization, definition, no evidence levelPrime factorizationdefinitionAddition of natural numbers, definition, no evidence levelAddition of natural n…definitionThe successor function is injective, statement, no evidence levelThe successor functio…statementZero is not a successor, statement, no evidence levelZero is not a success…statementProof of the commutativity of addition by induction, proof, no evidence levelProof of the commutat…proofOrder on the natural numbers, definition, no evidence levelOrder on the natural …definitionCommutativity of addition, statement, no evidence levelCommutativity of addi…statementProof of strong induction from ordinary induction, proof, no evidence levelProof of strong induc…proofStrong induction, statement, no evidence levelStrong inductionstatementProof of the well-ordering principle from strong induction, proof, no evidence levelProof of the well-ord…proofWell-ordering principle, statement, no evidence levelWell-ordering princip…statementProof of the division algorithm, proof, no evidence levelProof of the division…proofProof of the existence of a prime divisor, proof, no evidence levelProof of the existenc…proofDivision algorithm, statement, no evidence levelDivision algorithmstatementExistence of a prime divisor, statement, no evidence levelExistence of a prime …statementProof of Bézout's identity, proof, no evidence levelProof of Bézout's ide…proofProof of the existence of prime factorization, proof, no evidence levelProof of the existenc…proofBézout's identity, statement, no evidence levelBézout's identitystatementExistence of prime factorization, statement, no evidence levelExistence of prime fa…statementProof of the generalized Euclid's lemma, proof, no evidence levelProof of the generali…proofGeneralized Euclid's lemma, statement, no evidence levelGeneralized Euclid's …statementProof of Euclid's lemma, proof, no evidence levelProof of Euclid's lem…proofEuclid's lemma, statement, no evidence levelEuclid's lemmastatementProof of the fundamental theorem of arithmetic, proof, no evidence levelProof of the fundamen…proofFundamental theorem of arithmetic, statement, no evidence levelFundamental theorem o…statementProof that if 2^n + 1 is prime then n is a power of 2, proof, no evidence levelProof that if 2^n + 1…proof
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Definition by recursion concept
  2. Divisibility definition
  3. Fermat number definition
  4. Mathematical induction concept
  5. Natural numbers object
  6. Peano axioms concept
  7. Greatest common divisor definition
  8. Prime number definition
  9. Successor function definition
  10. Coprime integers definition
  11. Prime factorization definition
  12. Addition of natural numbers definition
  13. The successor function is injective statement
  14. Zero is not a successor statement
  15. Proof of the commutativity of addition by induction proof
  16. Order on the natural numbers definition
  17. Commutativity of addition statement
  18. Proof of strong induction from ordinary induction proof
  19. Strong induction statement
  20. Proof of the well-ordering principle from strong induction proof
  21. Well-ordering principle statement
  22. Proof of the division algorithm proof
  23. Proof of the existence of a prime divisor proof
  24. Division algorithm statement
  25. Existence of a prime divisor statement
  26. Proof of Bézout's identity proof
  27. Proof of the existence of prime factorization proof
  28. Bézout's identity statement
  29. Existence of prime factorization statement
  30. Proof of the generalized Euclid's lemma proof
  31. Generalized Euclid's lemma statement
  32. Proof of Euclid's lemma proof
  33. Euclid's lemma statement
  34. Proof of the fundamental theorem of arithmetic proof
  35. Fundamental theorem of arithmetic statement
  36. Proof that if 2^n + 1 is prime then n is a power of 2 proof

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Fermat_number
About this page
TagKFVHE9P0K9
URIm2://KFVHE9P0K9
Kindproof
WritingW0 stub
MSC11A41
ProvesIf 2^n + 1 is prime then n is a power of 2
UsesPrime number, Fermat number, Fundamental theorem of arithmetic, Divisibility
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.