# $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.

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.

• Thank you very much! Very elegant solution. Oct 29, 2015 at 16:40
• @RaheemNajib, You are welcome!
– ZFR
Oct 29, 2015 at 16:42
• Nice proof! But why, after you showed it was square, did you conclude the unnecessary statement that it was congruent to 0 mod 3? That wasn't asked for. And I don't see why it warrants a "but". Oct 29, 2015 at 16:47
• @fleablood, Edited!
– ZFR
Oct 29, 2015 at 16:49
• @fleablood Because one needs to show that it is a perfect square, i.e. that it is a square of an integer. Before that, he has only shown that it is a square of a rational number. Oct 29, 2015 at 17:48