3
$\begingroup$

I need help with this problem:

$K$ is equal to $111\ldots111 - 22\ldots22$ where $1$ is used $2n$ times and $2$ is used $n$ times. Prove that $K$ is a perfect square.

It is true, but I can't find a way to prove it. The only interesting thing I've found is that when $n$ is $1, K=3^2$, when $n$ is $2, K=33^2$ and so on. I tried to prove it using induction but wasn't able to find a way to do it, so your help would be really appreciated.

$\endgroup$

2 Answers 2

11
$\begingroup$

Write $$111\ldots111 = \sum_{k=0}^{2n-1} 10^k = \frac{10^{2n} - 1}{9}$$ and $$22\ldots22 = 2\sum_{k=0}^{n-1}10^k = \frac{2 \cdot 10^n - 2}{9}.$$

Then $$K = \frac{10^{2n} - 2 \cdot 10^{n} + 1}{9} = \left(\frac{10^{n} - 1}{3}\right)^2.$$ Note that $10^n - 1$ is divisible by $3$, since $10^n \equiv 1^n \equiv 1 (\bmod 3)$.

$\endgroup$
6
  • $\begingroup$ Thank you for the answer! $\endgroup$
    – suomynona
    Nov 18, 2012 at 15:10
  • 1
    $\begingroup$ You also need to show, or at least mention, that $10^n-1$ is a multiple of 3. $\endgroup$
    – MJD
    Nov 18, 2012 at 15:23
  • $\begingroup$ @MJD Just multiply the first equation by $3$ $\endgroup$
    – Cocopuffs
    Nov 18, 2012 at 15:37
  • 2
    $\begingroup$ @MJD I disagree: if $x$ is rational and satisfies a monic equation like $T^2 - x^2 = 0$ then it has to be an integer anyway. I will add it to the answer, though. $\endgroup$
    – Cocopuffs
    Nov 18, 2012 at 15:50
  • 1
    $\begingroup$ Since each term was gotten by summing integers, the difference has to be an integer, even though it might not be obvious when looking at the expression. $\endgroup$ Nov 18, 2012 at 16:10
3
$\begingroup$

The number that you are looking at is $$N = (10^{2n-1}+10^{2n-2}+\ldots+10+1)-2(10^{n-1}+10^{n-2}+\ldots+10+1)$$ Summing the GPs, $$N = \frac{10^{2n}-1}{9}-2\frac{10^n-1}{9} = \frac{10^{2n}-2\times10^n +1}{9} = \bigg(\frac{10^n-1}{3}\bigg)^2$$

$\frac{10^n-1}{3}$ will always be of the form $333\ldots$ So, $N$ is a perfect square for all $n$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.