The Number a^{2} + b^{2} − dc^{2} Revisited

Nguyen Viet Dung and Luu Ba Thang Department of Mathematics and Informatics Hanoi National University of Education 136 Xuan Thuy Cau Giay, Hanoi Vietnam

                 thanglb@hnue.edu.vn
             vietdung10122000@gmail.com

Abstract In 2015, Nowicki posed the following question: let d = q or d = 2q, where q is a product of prime numbers of the form 4k + 1. Is it true that d is a special number? We answer this open question.

1 Introduction

A positive integer d is called a special number if for every integer m there exist nonzero integers a, b, c such that m = a^{2} + b^{2} − dc^{2}. Nowicki [1] proved that there are infinitely many special numbers and every special number is of the form q or 2q, where either q = 1 or q is a product of prime numbers of the form 4k + 1. Then he posed the following open question: let d = q or d = 2q, where q is a product of prime numbers of the form 4k + 1. Is it true that d is a special number? In this article, we confirm that the answer is yes. Theorem 1. Let d = q or d = 2q, where q is a product of prime numbers of the form 4k +1. Then d is a special number.

2 Proof of the main result

First, we recall some lemmas that we need to prove our results.

Lemma 2. [3, p. 378] If an odd prime p divides the sum of the squares of two relatively prime positive integers, then it must be of the form 4k + 1.

Lemma 3. [3, p. 227] If p is a prime of the form 4k + 1 then for s = 1, 2, …, the number p^{s} admits precisely one representation as the sum of the squares of two relatively prime natural numbers.

Lemma 4. [3, p. 228] If m, n are two odd numbers that are relatively prime, and such that each of them is representable as the sum of the squares of two relatively prime positive integers, then the product mn admits at least two representations as the sum of the squares of two relatively prime positive integers that differ not only in the order of the summand.

Using the lemmas above, we can obtain the following theorem.

Theorem 5. A positive integer d > 2 can be written in form of a^{2} + b^{2}, where a, b are two relatively prime positive integers if and only if d = q or d = 2q, where q is a product of prime numbers of the form 4k + 1.

Proof. Assume that d = a^{2} + b^{2}, where a, b are two relatively prime positive integers. Let p be an odd prime factor of d, we have p|a^{2} + b^{2}. By Lemma 2, we see that p is a prime of the form 4k + 1.

If d is divisible by 4 then 4|a^{2} +b^{2}. This only happens when both a and b are even, which contradicts the fact that a, b are relatively prime. Therefore, 4 ∤ d. So d = q or d = 2q, where q is a positive integer that all of whose prime factors are of the form 4k + 1.

If d = q or d = 2q, where q is a product of prime numbers of the form 4k + 1. We have two cases:

(i) d = q: We write d = q_{1}^{α_{1}}q_{2}^{α_{2}} ⋯ q_{t}^{α_{t}}, where q_{1}, q_{2}, …, q_{t} are distinct primes of form 4k+1 and α_{j} are positive integers for all j = 1, 2, …, t. By Lemma 3, q_{j}^{α_{j}} can be written as the sum of the squares of two relatively prime positive integers for all j = 1, 2, …, t. By Lemma 4 we have d = q_{1}^{α_{1}}q_{2}^{α_{2}} ⋯ q_{t}^{α_{t}} can be written as the sum of the squares of two relatively prime positive integers for all j = 1, 2, …, t.

(ii) d = 2q. By (i), we have q = A^{2} +B^{2}, where A, B are positive integers and gcd(A, B) =

1. So

d = 2q = 2(A^{2} + B^{2}) = (A + B)^{2} + (A − B)^{2}.

Since q is odd, we see that A+B and A−B are also odd. Combined with gcd(A, B) = 1, we deduce that gcd(A + B, A − B) = 1.

Now we answer the open question that we mentioned in introduction.

Proof of Theorem 1. We consider two cases:

(i) d = q, where q is a product of prime numbers of the form 4k + 1.

By Theorem 5, we have d = A^{2} +B^{2}, where A, B are positive integers and gcd(A, B) = 1. Since d is odd, we deduce that A + B is odd. Without loss of generality, we can consider that A is even and B is odd.

Because gcd(A, B) = 1, there exist integers e, f such that Ae + Bf = 1. Then for all integers k we have

A(e + Bk) + B(f − Ak) = 1.  (1)

Now let n be an arbitrary integer. We consider two cases:

(a) n is even. Because B is odd, we can choose k_{0} ∈ ℤ such that e + Bk_{0} is odd. Therefore e + B(k_{0} + 2t) is odd for all t ∈ ℤ. Now we can easily see that

lim_{t→+∞} |n − (e + B(k_{0} + 2t))^{2} − (f − A(k_{0} + 2t))^{2}| = +∞;

lim_{t→+∞} |A · \frac{n − (e + B(k_{0} + 2t))^{2} − (f − A(k_{0} + 2t))^{2}}{2} + e + B(k_{0} + 2t)| = +∞;

lim_{t→+∞} |B · \frac{n − (e + B(k_{0} + 2t))^{2} − (f − A(k_{0} + 2t))^{2}}{2} + f − A(k_{0} + 2t)| = +∞.

So we can choose a large enough positive integer t_{0} such that

n − (e + B(k_{0} + 2t_{0}))^{2} − (f − A(k_{0} + 2t_{0}))^{2} ≠ 0;

A · \frac{n − (e + B(k_{0} + 2t_{0}))^{2} − (f − A(k_{0} + 2t_{0}))^{2}}{2} + e + B(k_{0} + 2t_{0}) ≠ 0;

B · \frac{n − (e + B(k_{0} + 2t_{0}))^{2} − (f − A(k_{0} + 2t_{0}))^{2}}{2} + f − A(k_{0} + 2t_{0}) ≠ 0.

Set e_{1} = e + B(k_{0} + 2t_{0}), f_{1} = f − A(k_{0} + 2t_{0}) and l = \frac{n − e_{1}^{2} − f_{1}^{2}}{2} ; then

l ≠ 0, Al + e_{1} ≠ 0, Bl + f_{1} ≠ 0

and e_{1} is odd. Combined with (1), we get Ae_{1} + Bf_{1} = 1. Because A is even, Ae_{1} is even and so that, Bf_{1} is odd. Hence, f_{1} is odd. Since e_{1} and f_{1} are odd, it follows that e_{1}^{2} + f_{1}^{2} is even. This deduces that

l = \frac{n − e_{1}^{2} − f_{1}^{2}}{2} ∈ ℤ.

Set

a = Al + e_{1}, b = Bl + f_{1}, c = l;

then we have

a^{2} + b^{2} − dc^{2} = (Al + e_{1})^{2} + (Bl + f_{1})^{2} − dl^{2}
= 2(Ae_{1} + Bf_{1})l + e_{1}^{2} + f_{1}^{2}
= 2l + e_{1}^{2} + f_{1}^{2} = n,

where a = Al + e_{1} ≠ 0, b = Bl + f_{1} ≠ 0, l ≠ 0.

(b) n is odd. Because B is odd, we can choose k_{1} ∈ ℤ such that e + Bk_{1} is even. Then e + B(k_{1} + 2t) is even for all t ∈ ℤ. Now we see that

lim_{t→+∞} |n − (e + B(k_{1} + 2t))^{2} − (f − A(k_{1} + 2t))^{2}| = +∞;

lim_{t→+∞} |A · \frac{n − (e + B(k_{1} + 2t))^{2} − (f − A(k_{1} + 2t))^{2}}{2} + e + B(k_{1} + 2t)| = +∞;

lim_{t→+∞} |B · \frac{n − (e + B(k_{1} + 2t))^{2} − (f − A(k_{1} + 2t))^{2}}{2} + f − A(k_{1} + 2t)| = +∞.

Therefore, we can choose a large enough positive integer t_{1} such that

n − (e + B(k_{1} + 2t_{1}))^{2} − (f − A(k_{1} + 2t_{1}))^{2} ≠ 0;

A · \frac{n − (e + B(k_{1} + 2t_{1}))^{2} − (f − A(k_{1} + 2t_{1}))^{2}}{2} + e + B(k_{1} + 2t_{1}) ≠ 0;

B.\frac{n − (e + B(k_{1} + 2t_{1}))^{2} − (f − A(k_{1} + 2t_{1}))^{2}}{2} + f − A(k_{1} + 2t_{1}) ≠ 0.

Set

e_{2} = e + B(k_{1} + 2t_{1}), f_{2} = f − A(k_{1} + 2t_{1}) and l_{1} = \frac{n − e_{2}^{2} − f_{2}^{2}}{2} ;

then

l_{1} ≠ 0, Al_{1} + e_{2} ≠ 0, Bl_{1} + f_{2} ≠ 0

and e_{2} is even. Combined with (1), we obtain Ae_{2} + Bf_{2} = 1. Because A is even, Ae_{2} is even and Bf_{2} is odd. Therefore, f_{2} is odd. This implies that e_{2}^{2} + f_{2}^{2} is odd. So

l_{1} = \frac{n − e_{2}^{2} − f_{2}^{2}}{2} ∈ ℤ.

Set

a = Al_{1} + e_{2}, b = Bl_{1} + f_{2}, c = l_{1};

then we obtain

a^{2} + b^{2} − dc^{2} = (Al_{1} + e_{2})^{2} + (Bl_{1} + f_{2})^{2} − dl_{1}^{2}
= 2(Ae_{2} + Bf_{2})l_{1} + e_{2}^{2} + f_{2}^{2}
= 2l_{1} + e_{2}^{2} + f_{2}^{2} = n,

where a = Al_{1} + e_{2} ≠ 0, b = Bl_{1} + f_{2} ≠ 0, l_{1} ≠ 0. (ii) d = 2q, where q a product of prime numbers of the form 4k + 1.

By Theorem 5 we have d = C^{2} + D^{2}, where C, D are odd and relatively prime. Now let n be an arbitrary integer. Then we consider two cases:

(c) n is odd.

Because gcd(C, D) = 1, there exist integers g, h such that

Cg + Dh = 1.

Then for every integer k we have

C(g + Dk) + D(h − Ck) = 1  (2)

Because both C, D are odd, we have (g + Dk) + (h − Ck) is odd. Hence, (g + Dk)^{2} + (h − Ck)^{2} is odd. We see that

lim_{k→+∞} |n − (g + Dk)^{2} − (h − Ck)^{2}| = +∞;

lim_{k→+∞} |C · \frac{n − (g + Dk)^{2} − (h − Ck)^{2}}{2} + (g + Dk)| = +∞;

lim_{k→+∞} |D · \frac{n − (g + Dk)^{2} − (h − Ck)^{2}}{2} + (h − Ck)| = +∞.

Therefore, we can choose a large enough positive integer k_{2} such that n − (g + Dk_{2})^{2} − (h − Ck_{2})^{2} ≠ 0;

C · \frac{n − (g + Dk_{2})^{2} − (h − Ck_{2})^{2}}{2} + (g + Dk_{2}) ≠ 0;

D · \frac{n − (g + Dk_{2})^{2} − (h − Ck_{2})^{2}}{2} + (h − Ck_{2}) ≠ 0.

Set

g_{1} = g + Dk_{2}, h_{1} = h − Ck_{2} and j = \frac{n − g_{1}^{2} − h_{1}^{2}}{2} ;

then j ≠ 0, Cj + g_{1} ≠ 0, Dj + h_{1} ≠ 0 and g_{1}^{2} + h_{1}^{2} is odd. Because n and g_{1}^{2} + h_{1}^{2}

are odd, it follows that j = \frac{n − g_{1}^{2} − h_{1}^{2}}{2} is an integer. Set c = j, a = Cj + g_{1}, b = Dj + h_{1}; then

\begin{aligned}a^{2} + b^{2} − dc^{2} & = (Cj + g_{1})^{2} + (Dj + h_{1})^{2} − dj^{2} \\ & = 2(Cg_{1} + Dh_{1})j + g_{1}^{2} + h_{1}^{2} = n. \end{aligned}

Notice that a = Cj + g_{1} ≠ 0, b = Dj + h_{1} ≠ 0, c = j ≠ 0.

(d) n is even. Because gcd(C, D) = 1, there exist integers g′, h′ such that

Cg′ + Dh′ = 2.

Then for every integer k we have

C(g′ + Dk) + D(h′ − Ck) = 2  (3)

Now we consider two small cases of n:

First case: n ≡ 2 (mod 4). Because C, D are odd, we can choose k_{4} ∈ ℤ such that g′ + Dk_{4} is odd. From (3), we have

C(g′ + Dk_{4}) + D(h′ − Ck_{4}) = 2.

Therefore, h′ − Ck_{4} is also odd. Now we see that

lim_{t→+∞} |n − (g′ + D(k_{4} + 2t))^{2} − (h′ − C(k_{4} + 2t))^{2}| = +∞;

lim_{t→+∞} |C · \frac{n − (g′ + D(k_{4} + 2t))^{2} − (h′ − C(k_{4} + 2t))^{2}}{2} + (g′ + D(k_{4} + 2t))| = +∞;

lim_{t→+∞} |D · \frac{n − (g′ + D(k_{4} + 2t))^{2} − (h′ − C(k_{4} + 2t))^{2}}{2} + (h′ − C(k_{4} + 2t))| = +∞.

Therefore, we can choose a large enough positive integer t_{4} such that

n − (g′ + D(k_{4} + 2t_{4}))^{2} − (h′ − C(k_{4} + 2t_{4}))^{2} ≠ 0;

C · \frac{n − (g′ + D(k_{4} + 2t_{4}))^{2} − (h′ − C(k_{4} + 2t_{4}))^{2}}{2} + (g′ + D(k_{4} + 2t_{4})) ≠ 0;

D · \frac{n − (g′ + D(k_{4} + 2t_{4}))^{2} − (h′ − C(k_{4} + 2t_{4}))^{2}}{2} + (h′ − C(k_{4} + 2t_{4})) ≠ 0.

Set g_{2} = g′ + D(k_{4} + 2t_{4}), h_{2} = h′ − C(k_{4} + 2t_{4}), y = \frac{n − g_{2}^{2} − h_{2}^{2}}{4} ; then

y ≠ 0, Cy + g_{2} ≠ 0, Dy + h_{2} ≠ 0

and g_{2}, h_{2} are odd. Because g_{2}, h_{2} are odd, we have g_{2}^{2} + h_{2}^{2} ≡ n (mod 4) and

so that y = \frac{n − g_{2}^{2} − h_{2}^{2}}{4} is an integer. From (3), we have Cg_{2} + Dh_{2} = 2. Set a = Cy + g_{2}, b = Dy + h_{2}, c = y; then we have

\begin{aligned}a^{2} + b^{2} − dc^{2} & = (Cy + g_{2})^{2} + (Dy + h_{2})^{2} − dy^{2} \\ & = 2(Cg_{2} + Dh_{2})y + g_{2}^{2} + h_{2}^{2} = n, \end{aligned}

where a = Cy + g_{2} ≠ 0, b = Dy + h_{2} ≠ 0, c = y ≠ 0.

Second case: n ≡ 0 (mod 4). Since D, C are odd, we can choose k′ ∈ ℤ such that g′ + Dk′ is even. From (3), we have

C(g′ + Dk′) + D(h′ − Ck′) = 2.

Because g′ + Dk′ is even, h′ − Ck′ is even. We see that

lim_{t→+∞} |n − (g′ + D(k′ + 2t))^{2} − (h′ − C(k′ + 2t))^{2}| = +∞;

lim_{t→+∞} |C · \frac{n − (g′ + D(k′ + 2t))^{2} − (h′ − C(k′ + 2t))^{2}}{2} + (g′ + D(k′ + 2t))| = +∞;

lim_{t→+∞} |D · \frac{n − (g′ + D(k′ + 2t))^{2} − (h′ − C(k′ + 2t))^{2}}{2} + (h′ − C(k′ + 2t))| = +∞.

So we can choose a large enough positive integer t′ such that

n − (g′ + D(k′ + 2t′))^{2} − (h′ − C(k′ + 2t′))^{2} ≠ 0;

C · \frac{n − (g′ + D(k′ + 2t′))^{2} − (h′ − C(k′ + 2t′))^{2}}{2} + (g′ + D(k′ + 2t′)) ≠ 0;

D · \frac{n − (g′ + D(k′ + 2t′))^{2} − (h′ − C(k′ + 2t′))^{2}}{2} + (h′ − C(k′ + 2t′)) ≠ 0.

Set g_{3} = g′ + D(k′ + 2t′), h_{3} = h′ − C(k′ + 2t′), y_{1} = \frac{n − g_{3}^{2} − h_{3}^{2}}{4} . Then

y_{1} ≠ 0, Cy_{1} + g_{3} ≠ 0, Dy_{1} + h_{3} ≠ 0 and both g_{3}, h_{3} are even. Because g_{3}, h_{3}

are even, we have g_{3}^{2} + h_{3}^{2} ≡ n (mod 4) and so that y_{1} = \frac{n − g_{3}^{2} − h_{3}^{2}}{4} is an integer.

From (3) we have Cg_{3} + Dh_{3} = 2. Set

a = Cy_{1} + g_{3}, b = Dy_{1} + h_{3}, c = y_{1};

then we have

\begin{aligned}a^{2} + b^{2} − dc^{2} & = (Cy_{1} + g_{3})^{2} + (Dy_{1} + h_{3})^{2} − dy_{1}^{2} \\ & = 2(Cg_{3} + Dh_{3})y_{1} + g_{3}^{2} + h_{3}^{2} = n, \end{aligned}

where a = Cy_{1} + g_{3} ≠ 0, b = Dy_{1} + h_{3} ≠ 0, c = y_{1} ≠ 0.

Combining (i) and (ii), we have the desired proof.

3 Acknowledgments

The authors would like to thank the referee and the editor-in-chief for useful comments and suggestions. The second author thanks Hanoi National University of Education for the support during his work on this paper.

References

[1] A. Nowicki, The number a^{2} + b^{2} − dc^{2}, J. Integer Sequences 18 (2015), Article 15.2.3.

[2] S. Prugsapitak and N. Thongngam, Representation of integers of the form x^{2} + my^{2} − z^{2}, J. Integer Sequences 24 (2021), Article 24.7.7.

[3] W. Sierpiński, Elementary Theory of Numbers, North-Holland, 1988.

2010 Mathematics Subject Classification: Primary 11E25. Keywords: sum of squares.

Received April 27 2021; revised version received September 27 2021. Published in Journal of Integer Sequences, October 1 2021.

Return to Journal of Integer Sequences home page.