The Numbers a^{2} + b^{2} − dc^{2}

Andrzej Nowicki Nicolaus Copernicus University Faculty of Mathematics and Computer Science 87-100 Toruń Poland

                     anow@mat.uni.torun.pl

Abstract We say that a positive integer d is special if for every integer m there exist nonzero integers a, b, c such that m = a^{2} + b^{2} − dc^{2}. In this note we present examples and some properties of special numbers. Moreover, we present an infinite sequence of special numbers.

1 Introduction

Let d be a positive integer. If a, b, c are integers, then let [a, b, c]_{d} denote the number a^{2} + b^{2} − dc^{2}. We say that d is special if for every integer m there exist nonzero integers a, b, c such that m = [a, b, c]_{d}.

We present examples and some properties of special numbers. Moreover, we present an infinite sequence of special numbers.

2 The numbers a^{2} + b^{2} − c^{2}

Observe that 0 = [3, 4, 5]_{1} and

−1 = [2, 2, 3]_{1},  1 = [1, 1, 1]_{1},  −6 = [3, 1, 4]_{1},  6 = [3, 1, 2]_{1},
−2 = [1, 1, 2]_{1},  2 = [3, 3, 4]_{1},  −7 = [1, 1, 3]_{1},  7 = [2, 2, 1]_{1},
−3 = [3, 2, 4]_{1},  3 = [6, 4, 7]_{1},  −8 = [2, 2, 4]_{1},  8 = [4, 1, 3]_{1},
−4 = [2, 1, 3]_{1},  4 = [2, 1, 1]_{1},  −9 = [6, 2, 7]_{1},  9 = [3, 1, 1]_{1},
−5 = [4, 2, 5]_{1},  5 = [5, 4, 6]_{1},  −10 = [5, 1, 6]_{1},  10 = [5, 1, 4]_{1}.

One of the problems presented in [3, Problem L25] states that every integer is of the form [a, b, c]_{1}, where a, b, c are integers. We will show that every integer is of the form [a, b, c]_{1} where a, b, c are nonzero integers.

Proposition 1. The number 1 is special, that is, for every integer m there exist nonzero integers a, b, c such that m = a^{2} + b^{2} − c^{2}.

Proof. It follows from the following equalities:

2k − 1 = [2, k − 2, k − 3]_{1}, 2k = [k, 1, k − 1]_{1}

for k ∈ ℤ, and 3 = [6, 4, 7]_{1}, 5 = [5, 4, 6]_{1}, 2 = [3, 3, 4]_{1}.

It is known [1, p. 38] that the equation x^{2} + y^{2} − z^{2} = 3 has infinitely many solutions in positive integers. The equation x^{2} + y^{2} − z^{2} = 1997 has also infinitely many solutions in positive integers [7, p. 9]. In the next proposition we show that the same is true for every integer.

Proposition 2. For every integer m there are infinitely many triples (a, b, c) of nonzero integers such that m = a^{2} + b^{2} − c^{2}.

Proof. This is a consequence of the following two equalities.

2k − 1 = (2t)^{2} + (2t^{2} − k)^{2} − (2t^{2} − k + 1)^{2},
2k = (2t^{2} − 2t − k)^{2} + (2t − 1)^{2} − (2t^{2} − 2t − k + 1)^{2},

where k, t are integers.

3 Properties of special numbers

In this section we present some elementary properties of special numbers. The following, well known lemma (see, for example, [5]), will play an important role.

Lemma 3. A positive integer m is a sum of two integer squares if and only if all prime factors of m of the form 4k + 3 have even exponent in the prime factorization of m.

Now we prove

Proposition 4. Every special number is a sum of two integer squares. If a non-square positive integer d is special, then d is a sum of two nonzero integer squares.

Proof. Let d be a special number. There exist nonzero integers a, b, c such that [a, b, c]_{d} = d. Thus, we have the equality

a^{2} + b^{2} = d(c^{2} + 1),

which says that d(c^{2} + 1) ia a sum of two squares. Hence, by Lemma 3, all prime factors of d(c^{2} + 1) of the form 4k + 3 have even exponent in the prime factorization of d(c^{2} + 1). Since c^{2} + 1 is also a sum of two squares, all prime factors of d of the form 4k + 3 have even exponent in the prime factorization of d. Hence, again by Lemma 3, d is a sum of two integer squares. Now it is also clear that if additionally d is non-square, then d is a sum of two nonzero integer squares.

Note that 4 = 2^{2} + 0^{2} is a sum of two integer squares and the number 4 is not special. The number 8 = 2^{2} + 2^{2} is a sum of two nonzero squares and 8 is not special. In general we have

Proposition 5. If a positive integer d is divisible by 4, then d is not special.

Proof. Let d = 4k where k is a positive integer, and assume that d is special. Then a^{2} + b^{2} − dc^{2} = 3 for some nonzero integers a, b, c. This implies that the number a^{2} + b^{2} is of the form 4k + 3. But integers of the form 4k + 3 are not sums of two squares. Thus the assumption that d is special leads to a contradiction.

Proposition 6. If a positive integer d is divisible by a prime number of the form 4k + 3, then d is not special.

Proof. Let p be a prime number of the form 4k +3. Assume that p | d and d is special. Then d is a sum of two squares (by Proposition 4) and this implies (by Lemma 3) that p^{2} | d. Moreover, there exist nonzero integers a, b, c such that a^{2}+b^{2}−dc^{2} = p. In this case p divides the sum of two squares a^{2} + b^{2} and so, again by Lemma 3, the integer a^{2} + b^{2} is divisible by p^{2}. Hence, p^{2} divides p. Thus the assumption that d is special leads to a contradiction.

As a consequence of the above propositions we obtain the following theorem.

Theorem 7. 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.

Question 8. 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 do not know the answer to the above question.

Proposition 9. Let d be a non-square positive integer and let m be an integer. Assume that there exists a triple (a, b, c) of positive integers such that [a, b, c]_{d} = m. Then such triples (a, b, c) are infinitely many.

Proof. Let [a, b, c]_{d} = m for some positive integers a, b, c. Then the Pell equation

x^{2} − dz^{2} = m − b^{2}

has a solution in positive integers (x, z) = (a, c). It follows from the theory of Pell equations [5, 2, 4] that then this equation has infinitely many positive solutions. Let (u, v) be such a solution. Then the triple (u, b, v) is a solution in positive integers of the equation x^{2} + y^{2} − dz^{2} = m.

4 Examples

We already know that the number 1 is special. In this section we present the all special numbers smaller than 50.

Consider the case d = 2. Let us recall that [a, b, c]_{2} = a^{2} + b^{2} − 2c^{2}. Observe that 0 = [1, 1, 1]_{2} and we have

−1 = [4, 1, 3]_{2},  1 = [8, 3, 6]_{2},  −6 = [1, 1, 2]_{2},  6 = [2, 2, 1]_{2},
−2 = [12, 4, 9]_{2},  2 = [3, 1, 2]_{2},  −7 = [4, 3, 4]_{2},  7 = [4, 3, 3]_{2},
−3 = [2, 1, 2]_{2},  3 = [2, 1, 1]_{2},  −8 = [3, 1, 3]_{2},  8 = [3, 1, 1]_{2},
−4 = [8, 2, 6]_{2},  4 = [16, 6, 12]_{2},  −9 = [5, 4, 5]_{2},  9 = [4, 1, 2]_{2},
−5 = [3, 2, 3]_{2},  5 = [3, 2, 2]_{2},  −10 = [2, 2, 3]_{2},  10 = [3, 3, 2]_{2}.

Proposition 10. The number 2 is special, that is, for every integer m there exist nonzero integers a, b, c such that m = a^{2} + b^{2} − 2c^{2}.

Proof. This is a consequence of the equalities 2k − 1 = [k − 1, k, k − 1]_{2}, 4k = [k − 1, k + 1, k − 1]_{2}, 4k + 2 = [k − 3, k + 1, k − 2]_{2} (where k is an integer), and 1 = [8, 3, 6]_{2}, −1 = [4, 1, 3]_{2}, −4 = [9, 2, 6]_{2}. 4 = [16, 6, 12], −2 = [12, 4, 9]_{2}, 10 = [3, 3, 2]_{2}, 14 = [4, 4, 3]_{2}.

Note the following consequence of Propositions 10 and 9.

Proposition 11. For every integer m there are infinitely many triples (a, b, c), of nonzero integers such that m = a^{2} + b^{2} − 2c^{2}.

Example 12. Some solutions (x, y, z) of the equation x^{2} + y^{2} − 2z^{2} = 1 :

(8, 3, 6),  (15, 8, 12),  (24, 15, 20),  (33, 8, 24),  (35, 24, 30),
(48, 3, 34),  (48, 17, 36),  (48, 35, 42),  (63, 48, 56),  (72, 33, 56),
(72, 15, 52),  (80, 63, 72),  (93, 8, 66),  (93, 48, 74),  (99, 80, 90).

Example 13. For every integer a we have [a + 2, a, a + 1]_{2} = 2.

Consider now the case d = 5. Let us recall that [a, b, c]_{5} = a^{2} + b^{2} − 5c^{2}. Observe that 0 = [1, 2, 1]_{5} and we have

−1 = [12, 10, 7]_{5},  1 = [10, 9, 6]_{5},  −2 = [3, 3, 2]_{5},  2 = [9, 1, 4]_{5},
−3 = [1, 1, 1]_{5},  3 = [2, 2, 1]_{5},  −4 = [5, 4, 3]_{5},  4 = [20, 3, 9]_{5},
−5 = [6, 2, 3]_{5},  5 = [3, 1, 1]_{5},  −6 = [7, 5, 4]_{5},  6 = [5, 1, 2]_{5},
−7 = [3, 2, 2]_{5},  7 = [6, 4, 3]_{5},  −8 = [6, 1, 3]_{5},  8 = [3, 2, 1]_{5},
−9 = [10, 4, 5]_{5},  9 = [5, 2, 2]_{5},  −10 = [7, 11, 6]_{5},  10 = [3, 9, 4]_{5}.

Proposition 14. The number 5 is special, that is, for every integer m there exist nonzero integers a, b, c such that m = a^{2} + b^{2} − 5c^{2}.

Proof. It follows from the equalities

k^{2} + (2k − 2)^{2} − 5(k − 1)^{2} = 2k − 1, (k − 2)^{2} + (2k − 1)^{2} − 5(k − 1)^{2} = 2k,

and = −1 = [12, 10, 7]_{5}, 1 = [10, 9, 6]_{5}, 2 = [9, 1, 4]_{5}, 4 = [20, 3, 9]_{5}.

Note the following consequence of Propositions 14 and 9.

Proposition 15. For every integer m there are infinitely many triples (a, b, c), of positive integers such that m = a^{2} + b^{2} − 5c^{2}.

Proposition 16. Let d = q or d = 2q, where q is a product of prime numbers of the form 4k + 1. If d ⩽ 50, then d is special.

Proof. If d < 10, then d = 1, 2 or 5, and we already know that in this case d is special. If d ⩾ 10, then we have the following equalities:

[k, 3k − 3, k − 1]_{10} = [k − 5, 3k − 8, k − 3]_{10}  = 2k − 1,
[k + 1, 3k − 3, k − 1]_{10} = [k − 9, 3k − 13, k − 5]_{10}  = 4k,
[k − 1, 3k + 1, k]_{10} = [k − 21, 3k − 39, k − 14]_{10}  = 4k + 2.
[2k − 4, 3k − 10, k − 3]_{13} = [2k − 30, 3k − 36, k − 13]_{13}  = 2k − 1,
[2k − 3, 3k − 2, k − 1]_{13} = [2k − 29, 3k − 54, k − 17]_{13}  = 2k.
[k, 4k − 4, k − 1]_{17} = [k − 34, 4k − 106, k − 27]_{17}  = 2k − 1,
[k − 8, 4k − 19, k − 5]_{17} = [k − 76, 4k − 357, k − 65]_{17}  = 2k.
[3k − 18, 4k − 30, k − 7]_{25} = [3k − 68, 4k − 80, k − 21]_{25}  = 2k − 1,
[3k − 4, 4k − 3, k − 1]_{25} = [3k − 104, 4k − 153, k − 37]_{25} = 2k.
[k, 5k − 5, k − 1]_{26} = [k − 13, 5k − 44, k − 9]_{26}  = 2k − 1.
[k + 1, 5k − 5, k − 1]_{26} = [k − 25, 5k − 83, k − 17]_{26}  = 4k,
[k − 5, 5k − 9, k − 2]_{26} = [k − 57, 5k − 217, k − 44]_{26}  = 4k + 2.
[2k − 8, 5k − 14, k − 3]_{29} = [2k − 66, 5k − 188, k − 37]_{29} = 2k − 1,
[2k − 7, 5k − 26, k − 5]_{29} = [2k − 65, 5k − 142, k − 29]_{29} = 2k.

[3k − 7, 5k − 16, k − 3]_{34} = [3k − 24, 5k − 33, k − 7]_{34}  = 2k − 1,
[3k − 11, 5k − 27, k − 5]_{34} = [3k − 45, 5k − 61, k − 13]_{34}  = 4k,
[3k − 1, 5k + 1, k]_{34} = [3k − 69, 5k − 135, k − 26]_{34} = 4k + 2.
[k, 6k − 6, k − 1]_{37} = [k − 74, 6k − 376, k − 63]_{37}  = 2k − 1,
[k − 18, 6k − 77, k − 13]_{37} = [k − 166, 6k − 891, k − 149]_{37} = 2k.
[4k − 48, 5k − 68, k − 13]_{41} = [4k − 130, 5k − 150, k − 31]_{41} = 2k − 1,
[4k − 5, 5k − 4, k − 1]_{41} = [4k − 251, 5k − 332, k − 65]_{41} = 2k.
[k, 7k − 7, k − 1]_{50} = [k − 25, 7k − 132, k − 19]_{50}  = 2k − 1,
[k + 1, 7k − 7, k − 1]_{50} = [k − 49, 7k − 257, k − 37]_{50}  = 4k,
[k − 11, 7k − 41, k − 6]_{50} = [k − 111, 7k − 641, k − 92]_{50} = 4k + 2.

By similar methods we are ready to prove, using a computer, that the same is true for d < 1000. Hence, we know that if d < 1000, then the answer to Question 8 is affirmative.

5 An infinite sequence of special numbers

In this section we prove that the set of special numbers is infinite. In our proof we use the following well known lemma [5, 2, 4] concerned with the sequence [6, A001110]. Let us recall that every number of the form t_{n} = \frac{n(n+1)}{2} = 1 + 2 + ⋯ + n is called triangular .

Lemma 17. There are infinitely many square triangular numbers. Examples:

t_{1} = 1^{2}, t_{8} = 6^{2}, t_{49} = 35^{2}, t_{288} = 204^{2}, t_{1681} = 1189^{2}.

Proof. The Pell equation x^{2} − 8y^{2} = 1 has infinitely many solutions in positive integers. Let (x, y) be one of such solutions. Then x is odd. Let x = 2n + 1 where n is a positive integer. Then we have t_{n} = \frac{n(n+1)}{2} = y^{2}.

Theorem 18. There are infinitely many special numbers.

Proof. We know from the previous lemma that there are infinitely many positive integers u such that u^{2} = \frac{k(k+1)}{2} for some positive integer k. Let d = (2u)^{2} + 1 with u ⩾ 2. Observe that d = k^{2} + (k + 1)^{2}. We will show that the number d is special. Let m be an integer.

First assume that m is even. Let m = 2s, where s is an integer. We have the equality

((k + 1)(s − 1) + 1)^{2} + (k(s − 1) − 1)^{2} − d(s − 1)^{2} = 2s.

Thus, if m = 2s with s ≠ 1, then there exist nonzero integers a, b, c such that [a, b, c]_{d} = m. Consider the case s = 1, that is, m = 2. Since d is non-square, the Pell equation x^{2} − dz^{2} = 1 has a solution (x, z) such that x, z are positive integers. Then we have [x, 1, z]_{d} = 2. Therefore, every even integer m is of the form [a, b, c]_{d} with nonzero integers a, b, c.

Now assume that m is odd. Let m = 2s − 1 where s is an integer. We have the equality

s^{2} + (2us − 2u)^{2} − d(s − 1)^{2} = 2s − 1.

Thus, if m = 2s−1 with s ≠ 1, then there exist positive integers a, b, c such that [a, b, c]_{d} = m. Consider the case s = 1, that is, m = 1. Since d − 4 is non-square (because d = 4u^{2} + 1 with u ⩾ 2), the Pell equation x^{2} − (d − 4)z^{2} = 1 has a solution (x, z) such that x, z are positive integers. Then we have [x, 2z, z]_{d} = 1. Therefore, every odd integer m is also of the form [a, b, c]_{d} with nonzero integers a, b, c.

References

[1] T. Andreescu and K. Kedlaya, Mathematical Olympiads, Problems and Solutions, From Around the World 1996–1997, American Mathematics Competitions, 1998.

[2] E. Barbeau, Pell’s Equation, Problem Books in Mathematics, Springer, 2003.

[3] H. Lee, Problems in Elementary Number Theory, Version 04526, 2007. Available at

   http://www.h1tv.fr.yuku.com/attach/ma/post-6-1151321263.pdf.

[4] A. Nowicki, Pell’s Equation (in Polish), Podróże po Imperium Liczb 14, Second Edition, OWSIiZ, Olsztyn, Toruń, 2014.

[5] W. Sierpiński, Elementary Theory of Numbers, North-Holland Mathematical Library, Vol. 31, 1988.

[6] N. J. A. Sloane, On-Line Encyclopedia of Integer Sequences, http://oeis.org.

[7] A. M. Storozhev, International Mathematics Tournament of Towns 1997–2002, Book 5, AMT Publishing, 2006.

2010 Mathematics Subject Classification: Primary 11D09; Secondary 11B99. Keywords: Pell’s equation, sum of squares.

(Concerned with sequences \underline{A000217} and \underline{A001110}.)

Received November 18 2014; revised versions received December 16 2014; December 18 2014. Published in Journal of Integer Sequences, January 24 2015.

Return to Journal of Integer Sequences home page.