Solution 1. First note that 2023=7⋅172. If a,b,c,d are divisible by 7, there are positive integers w,x,y,z such that
a=7w,b=7x,c=7y,d=7z
and the given conditions on a,b,c,d translate into
(i)w+x+y+z=172
(ii)172∣wx−yz
(iii)172∣w2+x2+y2+z2.
Multiplying (i) by x and using (ii), we obtain
0≡wx+x2+xy+xz≡yz+x2+yx+xz≡(x+y)(x+z)(mod172).
Because w>0, (i) implies that 0<x+y<172 and 0<x+z<172. Since 17 is a prime number, we now see that both, x+y and x+z, must be divisible by 17. Knowing this, we can conclude from (i) that w+z and
w+y must also be divisible by 17. This means that y≡z≡−w(mod17) and x≡−y(mod17), hence w2≡x2≡y2≡z2(mod17). Using (iii) we now see that
0≡w2+x2+y2+z2≡4w2(mod17).
This implies that w is divisible by 17, hence w≡x≡y≡z≡0(mod17) as required.
Solution 2. As we are allowed to assume a,b,c,d are divisible by 7, then we can write a=7a′,b=7b′,c=7c′,d=7d′. Dropping the primes, and noting 2023=7⋅172 the problem requires us to investigate solutions to:
(i) a+b+c+d=172
(ii) 172∣ab−cd
(iii) 172∣a2+b2+c2+d2.
We are required to show that a,b,c,d are all multiples of 17. It turns out the only relevant special properties of 17 are that it is an odd prime, so we make the following more general claim.
Let p be an odd prime and let a,b,c,d be positive integers such that
(i) a+b+c+d=p2
(ii) p2∣ab−cd
(iii) p2∣a2+b2+c2+d2.
Then all of a,b,c,d are multiples of p. If we can prove this claim, the original problem is then solved by writing p=17.
Adding or subtracting twice criterion (ii) from criterion (iii) gives
(a+b)2+(c−d)2≡0(modp2)(a−b)2+(c+d)2≡0(modp2).
Using (i) to replace a+b in the first equation by −c−d, and c+d by −a−b in the second gives
c2+d2≡a2+b2≡0(modp2).
Suppose for a contradiction that (without loss of generality given the symmetry of the equations) a is not a multiple of p. Then, as a and p2 are relatively prime, there is a residue i such that b≡ai(modp2) and we have
a2+b2≡a2(1+i2)≡0(modp2) whence i2=−1(modp2). It is clear that i=0(modp) and i=−1(modp) so that ai=0(modp) and (1+i)a=0(modp). Since b≡ai(modp2) and a+b≡(1+i)a(modp2), it follows that neither b nor a+b are multiples of p.
Now recall c2+d2≡(d+ic)(d−ic)≡0(modp2). We cannot have both p∣d+ic and p∣d−ic as that would imply p∣d and hence p∣c+d, contradicting a+b+c+d=p2. So one of the factors must be divisible by p2. By swapping c and d if necessary, we may assume p2∣d−ic. Then we have 0≡a+b+c+d≡(1+i)(a+c)(modp2).
As i=−1(modp), we can deduce that a+c≡0(modp2). Now a,c are both positive integers so a+c≥p2. But then we have 0<b+d=p2−a−c≤0, which is the required contradiction.