D=2: Proof 2 (proof of composite n solvability)

We use our previous proof: D=2: Proof 1 (proof of prime QR sufficiency).

Let

R
(
n
# )

{
(
x
,
y
)
∣
x
,
y
∈

Z

,
1
≤
x
y

2

<
3
2

2

,

x
2

−
2

y
2

=
n
}

{\displaystyle R(n)=\left\vert \{(x,y)\mid x,y\in\mathbb{Z},1\le x+y\sqrt{2}<3+2\sqrt{2},x^2-2y^2=n\} \right\vert}

. This notation will be needed in future. We deduce several properties of

R
(
n
)

{\displaystyle R(n)}

 that will assist us in determining when will the equation

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 have a solution.

1. R
(
n
)
≥
1

{\displaystyle R(n)\ge 1}

 if and only if the equation

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 has a solution.
Proof: If

R
(
n
)
≥
1

{\displaystyle R(n)\ge 1}

, clearly the equation

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 has a solution. Now suppose that a solution to

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 exists given as

(
x
,
y
)

{\displaystyle (x,y)}

. Consider

(

x
′

,

y
′

)

{\displaystyle (x',y')}

 with

x
′

y
′

2

=
(
x
y

2

)
(
3
−
2

2

)
m

{\displaystyle x'+y'\sqrt{2}=(x+y\sqrt{2})(3-2\sqrt{2})^m}

, where

(
3
2

2

)
m

≤
x
y

2

<
(
3
2

2

)

m
1

{\displaystyle (3+2\sqrt{2})^m\le x+y\sqrt{2}<(3+2\sqrt{2})^{m+1}}

. Then by multiplicativity of the norm,

x

′
2

−
2

y

′
2

=
n
×

1

−
m

=
n

{\displaystyle x'^2-2y'^2=n\times 1^{-m}=n}

, and

1
≤

x
′

y
′

2

<
3
2

2

{\displaystyle 1\le x'+y'\sqrt{2}<3+2\sqrt{2}}

 while also satisfying

x
,
y
∈

Z

{\displaystyle x,y\in\Z}

. Therefore

R
(
n
)
≥
1

{\displaystyle R(n)\ge 1}

.

◼

{\displaystyle \blacksquare }
2. If

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

 and

n
∈

Z

{\displaystyle n\in\mathbb{Z}}

, then

R
(

p
2

n
# )
R
(
n
)

{\displaystyle R(p^2 n)=R(n)}

.
Proof: Consider

x
2

−
2

y
2

=

p
2

n
mod
p

{\displaystyle x^2-2y^2=p^2 n \bmod p}

. Note that either

(

x
y

)

2

≡
2

(
mod

p
)

{\displaystyle \left(\frac{x}{y}\right)^2\equiv 2\pmod{p}}

 (where division denotes multiplying by one's inverse

mod
p

{\displaystyle \bmod p}

), which is impossible as

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

, or

p
∣
x
,
y

{\displaystyle p\mid x,y}

, giving rise to a solution to

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

. Hence

R
(

p
2

n
# )
R
(
n
)

{\displaystyle R(p^2 n)=R(n)}

.

◼

{\displaystyle \blacksquare }
3. If

p
∣∣
n

{\displaystyle p\mid\mid n}

 where

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

 then

R
(
n
# )
0

{\displaystyle R(n)=0}

.
Proof: We employ a similar argument as above. Consider

x
2

−
2

y
2

=
n
mod
p

{\displaystyle x^2-2y^2=n \bmod p}

. Note that either

(

x
y

)

2

≡
2

(
mod

p
)

{\displaystyle \left(\frac{x}{y}\right)^2\equiv 2\pmod{p}}

 (where division denotes multiplying by one's inverse

mod
p

{\displaystyle \bmod p}

), which is impossible as

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

, or

p
∣
x
,
y

{\displaystyle p\mid x,y}

, so

p
2

∣

x
2

−
2

y
2

=
n

{\displaystyle p^2\mid x^2-2y^2=n}

, contradicting the fact that

p
∣∣
n

{\displaystyle p\mid\mid n}

.

◼

{\displaystyle \blacksquare }
4. If

p

k

∣∣
n

{\displaystyle p^{k}\mid\mid n}

 where

k

{\displaystyle k}

 is odd then

R
(
n
# )
0

{\displaystyle R(n)=0}

.
Proof: This follows directly from the above 2 parts.
5. If

p
≡
1
,
7

(
mod

8
)

{\displaystyle p\equiv 1,7\pmod{8}}

, or

# p
2

{\displaystyle p = 2}

, then

R
(
p
)
≥
1

{\displaystyle R(p)\ge 1}

.
Proof: The former case is covered in D=2: Proof 1 (proof of prime QR sufficiency), while the latter case is solved by setting

# x
2
,
# y
1

{\displaystyle x=2,y=1}

.
6. If

R
(

n
1

)
≥
1

{\displaystyle R(n\_1)\ge 1}

 and

R
(

n
2

)
≥
1

{\displaystyle R(n\_2)\ge 1}

, then

R
(

n
1

n
2

)
≥
1

{\displaystyle R(n\_1 n\_2)\ge 1}

. (Can be extended to multiple terms.)
Proof:

R
(

n
1

)
≥
1

{\displaystyle R(n\_1)\ge 1}

 implies

∃
x
,
y
∈

Z

,

x
1
2

−
2

y
1
2

=

n
1

{\displaystyle \exists x,y\in\mathbb{Z},x\_1^2-2y\_1^2=n\_1}

, so

N
(

x
1

y
1

2

# )

n
1

{\displaystyle N(x\_1+y\_1\sqrt{2})=n\_1}

 (where

N
(
a
b

2

)

{\displaystyle N(a+b\sqrt{2})}

 denotes the usual multiplicative norm function on

Z

[

2

]

{\displaystyle \mathbb{Z}[\sqrt{2}]}

,

N
(
a
b

2

# )

a
2

−
2

b
2

{\displaystyle N(a+b\sqrt{2})=a^2-2b^2}

). Similarly,

R
(

n
2

)
≥
1

{\displaystyle R(n\_2)\ge 1}

 implies

∃
x
,
y
∈

Z

,

x
2
2

−
2

y
2
2

=

n
2

{\displaystyle \exists x,y\in\mathbb{Z},x\_2^2-2y\_2^2=n\_2}

, so

N
(

x
2

y
2

2

# )

n
2

{\displaystyle N(x\_2+y\_2\sqrt{2})=n\_2}

. By multiplicativity of the norm function, we have

N

(

(

x
1

y
1

2

)
(

x
2

y
2

2

)

)

=

n
1

n
2

{\displaystyle N\left((x\_1+y\_1\sqrt{2})(x\_2+y\_2\sqrt{2})\right)=n\_1 n\_2}

, so

R
(

n
1

n
2

)
≥
1

{\displaystyle R(n\_1 n\_2)\ge 1}

.

◼

{\displaystyle \blacksquare }

We are now ready for our main theorem.

**Claim.** The numbers *n* for which the equation

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 has a solution are precisely those which admits a prime power factorisation with no primes

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

 raised to an odd power.

**Proof.** By Part 2 of the above it can be seen that if

# i
1

k

p
i

a
i

∏

# j
1

m

q
i

b
j

{\displaystyle n=\prod\_{i=1}^k {p\_i}^{a\_i} \prod\_{j=1}^m {q\_i}^{b\_j}}

 where

∀
i
,

p
i

≡
1
,
7

(
mod

8
)
,
∀
j
,

q
j

≡
3
,
5

(
mod

8
)

{\displaystyle \forall i, p\_i\equiv 1,7\pmod{8}, \forall j, q\_j\equiv 3,5\pmod{8}}

, then

If *n* admits a prime power factorisation with a prime

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

 raised to an odd power, then by part 4 of the above it can be seen that

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 does not have a solution. Conversely, if

# i
1

k

p
i

a
i

∏

# j
1

m

q
j

2

b
j

{\displaystyle n=\prod\_{i=1}^k {p\_i}^{a\_i} \prod\_{j=1}^m {q\_j}^{2b\_j}}

 where

∀
i
,

p
i

≡
1
,
7

(
mod

8
)
,
∀
j
,

q
j

≡
3
,
5

(
mod

8
)

{\displaystyle \forall i, p\_i\equiv 1,7\pmod{8}, \forall j, q\_j\equiv 3,5\pmod{8}}

, then n admits a prime power factorisation with no primes

p
≡
3
,
5

(
mod

8
)

{\displaystyle p\equiv 3,5\pmod{8}}

 raised to an odd power. We use the extended form of part 6 of the above on

(

n
1

,

n
2

,
.
.
.

n
s

# )

(

p
1

,

p
1

,
.
.
.

p
1

⏞

a
1

,

p
2

,

p
2

,
.
.
.

p
2

⏞

a
2

,
.
.
.

p
k

,

p
k

,
.
.
.

p
k

⏞

a
k

,

q
1

2

b
1

,

q
2

2

b
2

,
.
.
.

q
m

2

b
m

)

{\displaystyle (n\_1,n\_2,...n\_s)=\left(\overbrace{p\_1,p\_1,...p\_1}^{a\_1},\overbrace{p\_2,p\_2,...p\_2}^{a\_2},...\overbrace{p\_k,p\_k,...p\_k}^{a\_k},{q\_1}^{2b\_1},{q\_2}^{2b\_2},...{q\_m}^{2b\_m}\right)}

 to find a solution to

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

, noting that

R
(

p
i

)
≥
1

{\displaystyle R(p\_i)\ge 1}

 and

∀
c
,
R
(

c
2

)
≥
1

{\displaystyle \forall c,R(c^2)\ge 1}

, showing that

R
(
n
)
≥
1

{\displaystyle R(n)\ge 1}

, and hence the equation

x
2

−
2

y
2

=
n

{\displaystyle x^2-2y^2=n}

 has a solution.

◼

{\displaystyle \blacksquare }