0

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.

Piquito
  • 29,594

3 Answers3

1

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

  • I "felt" that it was not difficult. It certainly was Olympics in schools but it is certain that it is nice. – Piquito Mar 14 '20 at 14:26
  • @Piquito: Achille Hui gave a more clever hint. –  Mar 14 '20 at 14:28
  • It is exactly what you have answered with the difference that Achille Hui lacked the corresponding (easy) induction in anticipation of a possible unexpected "jump" in the behavior of his "pattern". Cassels said "The whole numbers, the most exciting and the most intractable of mathematics." – Piquito Mar 14 '20 at 22:15
  • @Piquito: IMO Achille's way is easier because he directly obtains the pattern of the square root, and that pattern is simpler, $(10^k-1)/3+2$. Getting back to the square is straightforward. –  Mar 16 '20 at 07:46
  • The problem is actually very easy. If I had thought this I would not have posted it in MSE. Anyway, many thanks to you, Achille, Zwin and Servaes. – Piquito Mar 17 '20 at 20:44
1

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$?

zwim
  • 28,563
0

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

Servaes
  • 63,261
  • 7
  • 75
  • 163