# Solution Verification for RMO (Indian Math Competition)

Let N be the set of all positive integers and $$S={(a,b,c,d)\in N^4: a^2+b^2+c^2=d^2}$$. Find the largest positive integer m such that m divides abcd for all (a,b,c,d) \in S (RMO Problem 1: 29 Oct, 2023)

For $$a=b=2,c=1,d=3$$: $$a^2+b^2+c^2=2^2+2^2+1^2=9=3^2=d^2\Rightarrow abcd=12\Rightarrow m\leq12$$

abcd is divisible by 3 (working mod 3)
If $$a^2,b^2,c^2,d^2$$ are not divisible by 3, then each can only be 1 (a perfect square can only be 0 or 1) $$RHS=d^2\equiv1, LHS=a^2+b^2+c^2\equiv1+1+1\equiv3\equiv0\Rightarrow contradiction$$

abcd is divisible by 4 (working mod 4)
If $$a^2,b^2,c^2,d^2$$ are not divisible by 4, then each can only be 1 (a perfect square can only be 0 or 1) $$RHS=d^2\equiv1, LHS=a^2+b^2+c^2\equiv1+1+1\equiv3\equiv0\Rightarrow contradiction$$

Since abcd is divisible by 3 and also by 4, it is divisible by $$LCM(3,4)=12$$.Hence: $$m\geq12$$

Combine $$m\leq12$$ and $$m\geq12$$ to get $$m=12$$

• I am not sure why you think this is wrong. +1 for the solution Commented Oct 29, 2023 at 18:32

Update: When considering the equation $$a^2+b^2+c^2=d^2$$ modulo $$4$$, you use the fact that squares are congruent to 0 or 1 modulo 4: every even number squares to be 0 modulo 4, and every odd number squares to be congruent to 1 modulo 4.

Showing $$a^2,b^2,c^2$$ and $$d^2$$ cannot all be 1 mod 4 thus only shows one of $$a^2,b^2,c^2,d^2$$ is divisible by $$4$$, or equivalently one of $$a,b,c,d$$ is even (i.e. divisible by $$2$$).

You need to argue that at least two of $$a,b,c,d$$ must be even. This just requires refining the analysis you have already done though!

• I show by contradiction that a,b,c,d cannot all be 1 mod 4. Hence, at least one of them is 0 mod 4. Does that not show that the number is divisible by 4? Commented Oct 29, 2023 at 18:39
• @Starlight You have shown that for at least one of $a,b,c,d$ its square is equivalent to $0$ modulo $4.$ That is not the same as proving that the number is divisible by $4.$ Commented Oct 29, 2023 at 18:47
• I've updated my answer to hopefully be a bit clearer about the gap in your proof. You are very close to a complete proof though! Commented Oct 29, 2023 at 18:59
• I understood the mistake. I had the square mod 4 mixed up with the number mod 4. This was precisely the point I thought might have had a mistake. Thanks. Commented Oct 30, 2023 at 0:58

Here is the refinement of the mod 4 analysis (as suggested by krm2233).

We work with cases mod 4.
Case I: $$d^2\equiv0(mod 4)$$ Then $$a^2\equiv b^2\equiv c^2\equiv0 (mod 4)$$

Case II: $$d^2\equiv1(mod 4)$$ Then any two of a,b,c must be 0, and the third must be 1.

In both cases, we have two numbers whose squares are 0 mod 4,and hence the numbers themselves are 0 mod 2.

Hence, the numbers are even. Hence, abcd is divisible by 4.