716 Number Theory
803.The last digit of a perfect square cannot be 3 or 7. This implies thatxmust be even,
sayx= 2 x′. The condition from the statement can be written as
( 2 x
′
)^2 +( 5 y)^2 =z^2 ,
for integersx′,y, andz. It follows that there exist integersuandvsuch that 5y=u^2 −v^2
and 2x′= 2 uv(looking at parity, we rule out the case 5y= 2 uvand 2x′=u^2 −v^2 ).
From the first equality we see that any common factor ofuandvis a power of 5. From
the second we find thatuandvare powers of 2. Thusu= 2 x
′− 1
andv=1. It follows
thatx′andysatisfy the simpler Diophantine equation
5 y= 22 x
′− 2
− 1.
But then 5y=( 2 x
′− 1
− 1 )( 2 x
′− 1
- 1 ), and the factors on the right differ by 2, which
cannot happen since no powers of 5 differ by 2. Hence no such numbers can exist.
804.Here is how to transform the equation from the statement into a Pythagorean equa-
tion:
x^2 +y^2 = 1997 (x−y),
2 (x^2 +y^2 )= 2 · 1997 (x−y),
(x+y)^2 +(x−y)^2 − 2 · 1997 (x−y)= 0 ,
(x+y)^2 +( 1997 −x+y)^2 = 19972.
Becausexandyare positive integers, 0 <x+y<1997, and for the same reason
0 < 1997 −x+y<1997. The problem reduces to solving the Pythagorean equation
a^2 +b^2 = 19972 in positive integers. Since 1997 is prime, the greatest common divisor
ofaandbis 1. Hence there exist coprime positive integersu>vwith the greatest
common divisor equal to 1 such that
1997 =u^2 +v^2 ,a= 2 uv, b=u^2 −v^2.
Becauseuis the larger of the two numbers,^19972 <u^2 <1997; hence 33≤u≤44. There
are 12 cases to check. Our task is simplified if we look at the equality 1997=u^2 +v^2 and
realize that neitherunorvcan be divisible by 3. Moreover, looking at the same equality
modulo 5, we find thatuandvcan only be 1 or−1 modulo 5. We are left with the cases
m=34, 41, or 44. The only solution is(m, n)=( 34 , 29 ). Solvingx+y= 2 · 34 ·29 and
1997 −x+y= 342 − 292 , we obtainx=1827,y=145. Solvingx+y= 342 − 292 ,
1997 −x+y= 2 · 34 ·29, we obtain(x, y)=( 170 , 145 ). These are the two solutions
to the equation.
(Bulgarian Mathematical Olympiad, 1997)