Why is $\underbrace{444\dots44}_{2n} + \underbrace{888\dots88}_{n} + 4$ never a perfect square?

In this question, the questioner asked to prove that $$f(n)=\underbrace{444\dots44}_{2n} + \underbrace{888\dots88}_{n} + 4$$ is a perfect square for all $$n\in\mathbb N$$. However, I was not able to find any $$n$$ for which this is true. So I have the following "counter-conjecture": For any $$n\in\mathbb N=\{1,2,3,4,\dots\}$$, $$f(n)$$ is not a perfect square.

How can I prove this?

Notice that by simply evaluating the geometric series we get $$f(n)=\frac{8}{9} \left(10^n-1\right)+\frac{4}{9} \left(10^{2 n}-1\right)+4=\frac{4}{9} \left(2^{n+1} 5^n+100^n+6\right),$$

so it would be enough to prove that $$\sqrt{f(n)}=\frac{2}{3} \sqrt{2^{n+1} 5^n+100^n+6}$$ is never an integer.

But I don't know how to do this.

• what about $n=0$? Dec 10 '19 at 21:24
• Hi @J.W.Tanner, I use the convention that $0\not\in\mathbb N$. I‘ve also edited the question
– user729882
Dec 10 '19 at 21:27
• $100^n+2^{n+1}5^n+6=(10^n+1)^2+5$ Dec 10 '19 at 21:29
• @saulspatz then you must to prove $(10^n+1)^2+5 \neq m^2$ Dec 10 '19 at 21:32
• Also, one can note that $$f(n)\equiv 8\pmod{16}$$ which is impossible for square numbers Dec 10 '19 at 21:33

For all naturals $$n$$ we have $$f(n+1)-f(n)=44\cdot10^{2n}+8\cdot{10^n}.$$

Hence, $$\frac{f(n+1)-f(n)}{16}=11\cdot25\cdot10^{2(n-1)}+5\cdot10^{n-1}\in\mathbb N.$$

It follows that $$f(n)\equiv f(1)\equiv8\pmod{16}$$ for all $$n\in\mathbb N$$.

Because every square is equivalent to $$0,1,4$$ or $$9$$ modulo $$16$$, it follows that $$f(n)$$ is never a square.

Hint:

Can you show that $$\sqrt{f(n)}$$ is between consecutive integers $$\dfrac2310^n+\dfrac13$$ and $$\dfrac2310^n+\dfrac43$$?

Whenever I see something of the form $$A + 2A\times\text{something of magnitude} + A\times \times\text{something of geometrically more magnitude}$$, I figure it fits roughly into the form of $$A(\text{something of mangitude} + 1)^2$$.

So so $$4_{2n}= \frac 49\times (10^{2n} -1)$$ is roughly of magnitude $$(10^n)^2$$ and $$8_{n} = 49\times (10^n -1)$$ is roughly of magnitude $$10^n$$ then we should figure $$4_{2n}+ 8_n + 4$$ is fairly close so $$\frac 49(10^n + 1)^2$$.

And it turns it is VERY close (but slightly more) that it is too large to be a square of $$\frac 23(10^n+1)$$ but too small to be the next integer square.

(We might pause and consider that $$\frac 23(10^n+1)$$ need not be an integer. That turns out not to be relevant.)

=====

To continue along your lines:

Express as $$\sqrt{f(n)}=\frac{2}{3} \sqrt{2^{n+1} 5^n+100^n+6}$$

$$=\frac 23\sqrt{(10^n)^2 + 2*10^n + 6}$$

Notice that $$n \ge 1$$ then $$(10^n + 1)^2 = 10^{2n} + 2*10^n + 1 < (10^n)^2 + 2*10^n + 6 < 10^{2n} + 4*10^n + 4 = (10^n + 2)^2$$

So $$(10^n)^2 + 2*10^n + 6$$ is not a perfect square (but is an integer) so $$\sqrt{2^{n+1} 5^n+100^n+6}$$ is irrational and $$\frac{2}{3} \sqrt{2^{n+1} 5^n+100^n+6}$$ is not an integer.