How many integer solutions does the equation

$$
x^{2}-y^{2}=n^{2}
$$

have when $n=1992, n=1993$, and $n=1994$?
Let's examine more generally the question: how many integer solutions does the equation

$$
x^{2}-y^{2}=k
$$

have if \( k = \pm p_{1}^{\alpha_{1}} \cdot p_{2}^{\alpha_{2}} \cdot \ldots \cdot p_{m}^{\alpha_{m}} \), where \( p_{1}, p_{2}, \ldots, p_{m} \) are distinct primes. (The case \( k=0 \) is obviously uninteresting. For \( k = \pm 1 \), the solutions are: \( x = \pm 1, y = 0 \), or \( x = 0, y = \pm 1 \).)

By factoring the left-hand side of the equation, we get

$$
(x-y)(x+y)=k
$$

which shows that for the solutions we are looking for,

$$
(x+y) \mid k, \quad (x-y) \mid k
$$

holds. The number \( k \) has \( 2 \cdot (\alpha_{1}+1) \cdot (\alpha_{2}+1) \cdot \ldots \cdot (\alpha_{m}+1) \) integer divisors (indeed, any divisor \( d \) is of the form \( \pm p_{1}^{\beta_{1}} \cdot \ldots \cdot p_{m}^{\beta_{m}} \), where \( 0 \leqslant \beta_{i} \leqslant \alpha_{i} \); the exponent \( \beta_{i} \) can be chosen in \( (\alpha_{i}+1) \) ways, and the sign in two ways), so \( x+y \) can take at most this many values. The value of \( x+y \) then determines the value of \( x-y \); let these be \( d \) and \( k / d \), respectively, from which

$$
x=\frac{d+k / d}{2}, \quad y=\frac{d-k / d}{2}
$$

If these are integers, we have arrived at solutions to the original equation. In the following, we need to distinguish three cases.

1. Case. \( k \) is odd. Then, using the previous notation, \( 2 \nmid d \) and \( 2 \nmid \frac{k}{d} \), so both \( \frac{d+k / d}{2} \) and \( \frac{d-k / d}{2} \) are integers. Thus, we have found a pair \( (x, y) \) for each divisor \( d \), different divisors clearly yield different pairs, and these are all the solutions. Therefore, in this case, the number of solutions is:

$$
2(\alpha_{1}+1)(\alpha_{2}+1) \cdot \ldots \cdot (\alpha_{m}+1)
$$

2. Case. \( k \) is even, but \( 4 \nmid k \). Then one of the numbers \( d \) and \( k / d \) is even, the other is odd, so \( \frac{d+k / d}{2} \) is not an integer. Thus, in this case, there are no integer solutions.
3. Case. \( 4 \mid k \). In this case, one of \( d \) and \( k / d \) is certainly even, so for \( x \) and \( y \) to be integers, the other number must also be even. Therefore, the divisors \( d \) that provide solutions are those for which \( 2 \mid d \) and \( 2 \mid \frac{k}{d} \). If the exponent of \( p_{1}=2 \) in the prime factorization of such a \( d \) is denoted by \( \beta_{1} \),

$$
1 \leq \beta_{1} \leq \alpha_{1}-1
$$

holds. (This condition makes sense because \( \alpha_{1} \geq 2 \) due to the assumption \( 4 \mid k \).) There are \( \alpha_{1}-1 \) such \( \beta_{1} \) values, and since the other prime factors and the sign can be arbitrary within the previous bounds, the number of such divisors and thus the number of solutions is

$$
2(\alpha_{1}-1)(\alpha_{2}+1) \cdot \ldots \cdot (\alpha_{m}+1)
$$

Finally, let's see which of these cases the numbers in the original problem belong to. The number \( n^{2}=1992^{2}=2^{6} \cdot 3^{2} \cdot 83^{2} \) is an example of the third case, so the number of solutions is \( 2 \cdot 5 \cdot 3 \cdot 3 = 90 \); the number \( n^{2}=1993^{2} \) belongs to the first case with 6 solutions; while the number \( n^{2}=1994^{2}=2^{2} \cdot 997^{2} \) also gives 6 solutions according to the third case, \( 2 \cdot 1 \cdot 3 = 6 \).

Gábor Zsolt Tóth (Budapest, Árpád Gimn. I. o. t.)