$N=\underbrace{111 . . . 1}_{n\space times}\space\underbrace{222 . . . 2}_{n+1\space times}\space5$ is always a square?.

195 Views Asked by At

I come to see this problem do not know if it's easy or difficult (I sense it's not hard) and I want to share it with members of MSE. It comes from a French source in which it says it is an Olympics problem but does not say what kind of Olympics. I really like it and I'm going to try to solve it and hope others here want to solve it too.

Prove that the integers of the form $N=\underbrace{111 . . . 1}_{n\space times}\space\underbrace{222 . . . 2}_{n+1\space times}\space5$ are perfect squares.

3

There are 3 best solutions below

5
On BEST ANSWER

Hint:

$$10^{n+2}\frac{10^n-1}9+20\frac{10^{n+1}-1}9+5=\frac{10^{2n+2}+2\cdot10^{n+2}-10^{n+2}-20+45}9=\left(\frac{10^{n+1}+5}{3}\right)^2$$

and $10\bmod3=1$ hence $10^{n+1}\bmod3=1$.

0
On

Express $N$ as a function of $n$ in a more algebraically useful manner as follows: $$N(n)=5+20\times\frac{10^{n+1}-1}{9}+10^{n+2}\times\frac{10^n-1}{9}.$$ This can of course be simplified to get $$9N(n)=25+10\times10^{n+1}+10^{2n+2}=(10^{n+1}+5)^2.$$

0
On

When working with repunits it is often a good idea to fix $n$ and express then in term of $k=10^n$.

The formula for a repunit $\underbrace{111111}_\text{n times}$ is $r(n)=\dfrac{10^n-1}9=\dfrac{k-1}9$

So here you can express your big number has

$\begin{align} \underbrace{10^{n+2}r(n)}_{11100000}+\underbrace{10\times 2r(n+1)}_{22220}+5 &= 100k\left(\frac{k-1}9\right)+20\left(\frac{10k-1}9\right)+5\\ &=\frac 19\bigg(100k(k-1)+20(10k-1)+45\bigg)\\ &=\frac 19(100k^2+100k+25)\\ &=\frac{25}9(2k+1)^2=\left(\frac{10k+5}3\right)^2 \end{align}$

Now we can also rewrite it in term of repunits and $$\dfrac{10(9r(n)+1)+5}3=\dfrac{90r(n)+15}3=30r(n)+5=\overbrace{333}^\text{n times}5$$

You can have a look at another example of this technique in the following problem:

How to derive this sequence: $1^3+5^3+3^3=153,16^3+50^3+33^3=165033,166^3+500^3+333^3=166500333,\cdots$?