$A+B+C+7$ is perfect square where $A,B,C$ numbers with repeating digits.

Let $A=\underbrace{444...4}_{2m},$ $B=\underbrace{222...2}_{m+1}$ and $C=\underbrace{888...8}_{m}$.

Prove that $A+B+C+7$ is perfect square.

How to prove that problem?

I have checked it for small values of $m$ and it's true but I Can't prove it in general case.


Solution 1:

Proof:

$A=\underbrace{444...4}_{2m}=\dfrac{4}{9}\cdot \underbrace{999...9}_{2m}=\dfrac{4}{9}(10^{2m}-1).$

$B=\underbrace{222...2}_{m+1}=\dfrac{2}{9}\cdot \underbrace{999...9}_{m+1}=\dfrac{2}{9}(10^{m+1}-1).$

$C=\underbrace{888...8}_{m}=\dfrac{8}{9}\cdot \underbrace{999...9}_{m}=\dfrac{8}{9}(10^{m}-1).$

Hence $$A+B+C+7=\dfrac{4}{9}(10^{2m}-1)+\dfrac{2}{9}(10^{m+1}-1)+\dfrac{8}{9}(10^{m}-1)+7=$$$$=\dfrac{1}{9}(4\cdot 10^{2m}+28\cdot 10^m+49)=\dfrac{1}{9}(2\cdot 10^{m}+7)^2=\left(\dfrac{2\cdot 10^m+7}{3}\right)^2$$ but $$2\cdot 10^m+7\equiv 0 \pmod{3}$$ since $10^m\equiv 1 \pmod{3} \Rightarrow 2\cdot 10^m\equiv 2 \pmod{3} \Rightarrow 2\cdot 10^m+7\equiv 2+7\equiv 0 \pmod{3}.$

Q.E.D.

P.S. By the way very nice problem.