MathLabs

Problem 1

Determine all three-digit numbers NN that are divisible by 1111, such that N/11N/11 equals the sum of the squares of the digits of NN.
Step 5 of 6: Case B (with carry): a+b ≥ 10, digits become a+1, a+b−10, b
(a+1)2+(a+b−10)2+b2=10a+b⇒2a2+2ab+2b2−28a−21b+101=0(a+1)^2+(a+b-10)^2+b^2=10a+b \Rightarrow 2a^2+2ab+2b^2-28a-21b+101=0
Detailed analysis

When a+b≥10a+b\ge10, adding 10(a+b)10(a+b) to 100a+b100a+b causes a carry: the hundreds digit becomes a+1a+1 and the tens digit becomes a+b−10a+b-10 (with bb unchanged as the units digit). The digit-square condition now reads (a+1)2+(a+b−10)2+b2=10a+b(a+1)^2+(a+b-10)^2+b^2=10a+b, which expands to 2a2+2ab+2b2−28a−21b+101=02a^2+2ab+2b^2-28a-21b+101=0. The same kind of parity argument as before (writing b=2B+1b=2B+1 and checking evenness) shows bb must be odd, and in fact b=3b=3 or b=7b=7.