Prove that a number composed of only $2n$ "1"s, minus another number composed of only $n$ "2"s, is a perfect square.

1.2k Views Asked by At

Prove that a number composed of only $2n$ "1"s, minus another number composed of only $n$ "2"s, is a perfect square.

Examples:

$$11-2 = 9 = 3^2$$

$$1111 - 22 = 1089 = 33^2$$

My try

I saw that I can rearrange some of the "equations" like this

Examples: $$1111-22 = 101(11)-(11)2=11(101-2)=11\cdot99 = 11^2 \cdot 9 = 11^2 \cdot3^2 = (11\cdot 3)^2$$

$$111111-222 = 1001(111)-(111)2 = 111(1001-2) = 111 \cdot 999 = 111^2 \cdot9 = (111\cdot 3)^2$$

I think this is enough to prove that statement but I want a more "elegant" or general way (maybe an algebraic way?), and also to know if my solution is correct.

3

There are 3 best solutions below

4
On BEST ANSWER

The number composed of $n$ ones is $(10^n-1)/9$. So your number is $$\frac{10^{2n}-1}9-2\frac{10^n-1}9=\frac{a^2-1-2(a-1)}9$$ with $a=10^n$. I'll leave you to carry on...

2
On

Let $$x=\underbrace{1\dots1}_n$$ For any $n$, the number in question is $$\underbrace{1\dots1}_n\underbrace{0\dots0}_n-\underbrace{1\dots1}_n=x(10^n-1)=x(9x)=(3x)^2$$

0
On

Your proof is two representative examples with the hope that by the two examples it should be clear without further rigor that it holds for all.

Which, of course, is not a proof.

Actually your only problem is lack of acceptable notation:

$\underbrace{111...}_{2n} - \underbrace{2222...}_2=$

$(1\underbrace{000...}_{n-1}1)*\underbrace{111...}_{n}-2*\underbrace{111...}_{n}=$

$(1\underbrace{000...}_{n-1}1-2)*\underbrace{111...}_{n}=$

$\underbrace{999999...9}_n*\underbrace{111...}_{n}=$

$9*\underbrace{111...}_{n}*\underbrace{111...}_{n}=9*\underbrace{111...}_{n}^2 = (3\underbrace{111...}_{n})$.

But we can formalize these generalizations:

1) $\underbrace{111...1}_{2n} = \sum\limits_{i=0}^{2n-1} 10^i = 10^n*\sum\limits_{i=0}^{n-1} 10^i + \sum\limits_{i=0}^{n-1} 10^i$

$= (10^n + 1)\sum\limits_{i=0}^{n-1} 10^i = 1\underbrace{000...0}_{n-1}1*\underbrace{11....1}_n$

2) $\underbrace{222....2}_n = \sum\limits_{i=0}^{n-1} 2*10^i=2\sum\limits_{i=0}^{n-1} 10^i = 2*\underbrace{11....1}_n$

3) $\underbrace{999....9}=\sum\limits_{i=0}^{n-1} 9*10^i=9\sum\limits_{i=0}^{n-1} 10^i = 9*\underbrace{11....1}_n$

and $\underbrace{999....9}+1 = \sum\limits_{i=0}^{n-1} 9*10^i + 1$ which equals $\sum\limits_{i=1}^{n-1} 9*10^i + (9*10^0 + 1) = \sum\limits_{i=1}^{n-1} 9*10^i + 10^1 = \sum\limits_{i=2}^{n-1} 9*10^i+(9*10^1 + 10^1) = ....$ via induction if we can show

$\sum\limits_{i=k}^{n-1} 9*10^i + 10^k = \sum\limits_{i=k+1}^{n-1} 9*10^i + (9*10^k + 10^k) = \sum\limits_{i=k+1}^{n-1} 9*10^i + 10*10^k = \sum\limits_{i=k+1}^{n-1} 9*10^i + 10^{k+1}$.

So $\underbrace{999....9}+1 = \sum\limits_{i=n-1}^{n-1}9*10^i + 10^{n-1} = 9*10^{n-1} + 10^{n-1} = 10^n$

so $10^n -1 = \underbrace{999....9}$

[And THAT was overkill. You can state $10^n -1 = \underbrace{9999...9}_n$ without proof. But... well, if we are getting fussy that giving two examples isn't a "proof" we can get fussy that ... "how do we KNOW $10^n -1 = \underbrace{9999...9}_n$" ... well, THAT is how.]

With that we can do your proof:

$\underbrace{111...1}_{2n}- \underbrace{222....2}_n=$

$(10^n + 1)\underbrace{111...1}_{n}- 2*\underbrace{111...1}_{n}=$

$(10^n+1 - 2)*\underbrace{111...1}_{n}=$

$(10^n - 1) *\underbrace{111...1}_{n}=$

$(9*\underbrace{111...1}_{n})*(\underbrace{111...1}_{n})$

$3^2* \underbrace{111...1}_{n}^2 = (3*\underbrace{111...1}_{n})^2$

=====

But if we are doing formal proofs.

It would behoove us for a few moments to prove that for any $a \ne 1$:

$1 + a + a^2 + a^3 + ...... + a^k = \frac {a^k - 1}{a-1}$

Pf: $(a-1)(1 + a + a^2 + a^3 + ...... + a^k) =(a + a^2 + a^3 + ...... + a^{k+1}) -(1 + a + a^2 + a^3 + ...... + a^k)= a^{k+1} - 1$.

Which means $\underbrace{111...1}_n = 1 + 10 + 100 + ..... + 10^{n-1} = \frac {10^n -1}{10-1} = \frac {10^n-1}9$.

With that, Lord Sark's answer makes it easier:

$\underbrace{111...}_{2n} - \underbrace{222....2}_n =$

$\frac {10^{2n} - 1}{10 - 1} - 2\frac{10^{n} -1}{10-1} =$

$\frac {(10^n)^2 - 2*10^{n} + 1}{9} =(\frac {10^n - 1}{3})^2=$

$(\frac {(10-1)(1 + 10 + 100 + ..... )}3)^2= (3*\underbrace{111...11}_n)^2$.