A New General Equation for Sophie Germain Type Identities (Part II)

Primality Testing using the General Equation

Sophie Germaine during the 1800's came up with the identity relation which bears her name and is featured in a Wikipedia article. The identity is a polynomial factorization which states that:

x4 + 4y4 = ((x + y)2 + y2) × ((xy)2 + y2)

I have found that this identity is one of an infinite number of equations which are generated from this general equation:

x4 + n2y4 = ((x + y)2 + (n−1)y2) × ((x − y)2 + (n−1)y2)
= (x2 + 2xy + y2 + (n−1)y2) × (x2 − 2xy + y2 + (n−1)y2)
= (x2 + 2xy + ny2 ) × (x2 − 2xy + ny2)

where n = 2 corresponds to the original Sophie Germain identity and where n > 0 and may take on either odd or even values as shown below:

When n is odd
x4 + (2k+1)2y4 = ((x + y)2 + (2k+1−1)y2) × ((x − y)2 + (2k+1−1)y2)
= ((x + y)2 + 2ky2) × ((x − y)2 + 2ky2)
= (x2 + 2xy + (2k+1)y2) × (x2 − 2xy +(2k+1)y2)
= x4 + (2k+1)2y4
When n is even
x4 + (2k)2y4 = ((x + y)2 + (2k−1)y2) × ((x − y)2 + (2k−1)y2)
= (x2 + 2xy + y2 + (2k−1)y2) × (x2 − 2xy + y2 + (2k−1)y2)
= x4 + (2k)2y4

The general equation which may be used for primality testing, exhibits the following properties:

When n is odd and x = 1 and y = 1, only nonprime, composite values are formed. When n is even and x = 1 and y = 1, the values formed may or not be prime. For example, when n = 4, 6, 8 or 11, the values are 17, 37, 65 and 122, respectively. Other examples include 1297 for n = 36 and 8101 for n = 90. Both of them prime.

Two Examples

A Brilliant article contains an example from which we'll borrow some numbers:

For even n
Prove 344 + 1629 is composite.
x = 311, y = 167 and n = 4
344 + 1629 = (311)4 + 16(1628)
((311)2 + 2(167)2 + 2(311)(167)) × ((311)2 + 2(167)2 − 2(311)(167))


For odd n
Prove 344 + 12129 is composite.
x = 311, y = 1217 and n = 11
344 + 12129 = (311)4 + 121(12128)
((311)2 + 2(1217)2 + 2(311)(1217)) × ((311)2 + 2(1217)2 − 2(311)(1217))

Go to Part III for an n2 value of nine.
Go back to Part I or homepage.


Copyright © 2025 by Eddie N Gutierrez. E-Mail: enaguti1949@gmail.com