Skip to content
Gioi Toan
Start learning

Method · EYT-1.3 · Grade 8

Add and subtract to get a difference of two squares: the Sophie Germain identity

The problem

a) Is the number 20254+420252025^4 + 4^{2025} prime or composite?

b) Find all natural numbers nn such that n4+4nn^4 + 4^n is a prime number.

Solution

For any numbers x,yx, y, add and subtract 4x2y24x^2y^2, then use the difference of two squares:
x4+4y4=(x2+2y2)2−(2xy)2=(x2−2xy+2y2)(x2+2xy+2y2).x^4 + 4y^4 = (x^2 + 2y^2)^2 - (2xy)^2 = (x^2 - 2xy + 2y^2)(x^2 + 2xy + 2y^2).
The two factors can also be written as (x−y)2+y2(x - y)^2 + y^2 and (x+y)2+y2(x + y)^2 + y^2.

a) We have 42025=4⋅42024=4⋅24048=4⋅(21012)44^{2025} = 4 \cdot 4^{2024} = 4 \cdot 2^{4048} = 4 \cdot (2^{1012})^4. Let x=2025x = 2025, y=21012y = 2^{1012}:
20254+42025=[(x−y)2+y2][(x+y)2+y2].2025^4 + 4^{2025} = \left[(x - y)^2 + y^2\right]\left[(x + y)^2 + y^2\right].
The first factor is at least y2>1y^2 > 1, and the second factor is larger than the first (since x,yx, y are positive). So the given number is the product of two natural numbers greater than 1, hence it is composite.

b) Consider the cases for nn.

  • n=0n = 0: 0+1=10 + 1 = 1, which is not prime.
  • n=1n = 1: 1+4=51 + 4 = 5, which is prime.
  • nn even, n≥2n \ge 2: n4n^4 and 4n4^n are both even, so n4+4nn^4 + 4^n is an even number greater than 2, hence composite.
  • nn odd, n≥3n \ge 3: write n=2k+1n = 2k + 1 with k≥1k \ge 1. Then 4n=4⋅42k=4⋅(2k)44^n = 4 \cdot 4^{2k} = 4 \cdot (2^k)^4. Let x=nx = n, y=2k≥2y = 2^k \ge 2:

n4+4n=[(n−2k)2+4k][(n+2k)2+4k].n^4 + 4^n = \left[(n - 2^k)^2 + 4^k\right]\left[(n + 2^k)^2 + 4^k\right].
Both factors are at least 4k≥44^k \ge 4, so n4+4nn^4 + 4^n is composite.

So the only answer is n=1n = 1.

Answer: a) Composite. b) n=1n = 1.

How to come up with this idea

A huge number like 20254+420252025^4 + 4^{2025} cannot be worked out and then tested for divisors. To prove it is composite, the surest way is to write it as a product of two numbers greater than 1. The expression is a sum of two fourth powers (after writing 42025=4⋅(21012)44^{2025} = 4 \cdot (2^{1012})^4), and a sum is hard to split, whereas a difference of two squares splits easily.

So we ask: which term do we add to turn x4+4y4x^4 + 4y^4 into a square? It is 4x2y24x^2y^2, because x4+4x2y2+4y4=(x2+2y2)2x^4 + 4x^2y^2 + 4y^4 = (x^2 + 2y^2)^2. The part we must subtract, 4x2y2=(2xy)24x^2y^2 = (2xy)^2, is also a square, so a difference of two squares appears. Part a is the warm-up; part b asks you to cover every parity case of nn.

The problem type and where else the technique works

The identity x4+4y4=(x2−2xy+2y2)(x2+2xy+2y2)x^4 + 4y^4 = (x^2 - 2xy + 2y^2)(x^2 + 2xy + 2y^2) is named after the mathematician Sophie Germain. Adding and subtracting to get a difference of two squares also works for:

  • Factorising x4+4x^4 + 4, x4+64x^4 + 64, x4+x2+1x^4 + x^2 + 1.
  • Proving that a very large number is composite without working it out.
  • Simplifying algebraic fractions whose numerator or denominator has the form a4+4b4a^4 + 4b^4.

Common mistakes

  • Showing that the number is a product of two factors but forgetting to check that the smaller factor is greater than 1. If one factor equals 1, the product tells you nothing.
  • Writing 42025=(21012)44^{2025} = (2^{1012})^4 and losing the factor 4. Check again: (21012)4=24048=42024(2^{1012})^4 = 2^{4048} = 4^{2024}.
  • In part b, missing n=0n = 0 or n=1n = 1, or forgetting that for even nn, 4n4^n cannot be written as 4y44y^4 with yy an integer, so that case must be handled separately.

A similar problem to practise

Prove that n4+64n^4 + 64 is composite for every positive integer nn.

Show hint

Write 64=4⋅2464 = 4 \cdot 2^4.

Show answer

n4+64=(n2−4n+8)(n2+4n+8)n^4 + 64 = (n^2 - 4n + 8)(n^2 + 4n + 8), and the smaller factor equals (n−2)2+4≥4(n - 2)^2 + 4 \ge 4.

Back to the full issue 1