0

Check if positive integer $a+2b+4$ is a perfect square if $a=\underbrace{4 4... 4}_{2n\text{ digits }}$ , $b=\underbrace{8 8... 8}_{n\text{ digits }}$ and $n$ is a positive integer.

$$a=4\cdot\frac{10^{2n}-1}{10-1},b=8\cdot\frac{10^n-1}{10-1}$$

After factoring: $$a+2b+4=4\left(\frac{10^{2n}-1}{10-1}+4\cdot \frac{10^n-1}{10-1}+1\right)$$

For $n=1,n=2$, $\frac{10^{2n}-1}{10-1}+4\cdot \frac{10^n-1}{10-1}+1$ is not a perfect square.

Is there a number $n$ such that $a+2b+4$ is a perfect square?

user300048
  • 1,147
  • 1
    That should be 4 (blah + 2bleh +1). A 2 not a 4. – fleablood Nov 23 '16 at 23:29
  • n=1 yields 11+4+1 is a perfect square. You meant 11+2+1 is not a perfect square. 1111+22+1=1134 isn't either. – fleablood Nov 23 '16 at 23:34
  • The last two digits of blah + 2bleh +1 are always 34. $(10x+k)^2=100x^2+2xk+k^2 \equiv 34 \mod 100$. I think you can show that can never happen. – fleablood Nov 23 '16 at 23:40
  • Yes. Xxxxx 34 is even but not divisible by 4 so is never a perfect square. And 11111.......11+22222.....2 + 1= 1111.....1333333....33334. – fleablood Nov 23 '16 at 23:45
  • Oops. It's 2b! Well for n=1 we have 44 + 16 + 4=64 IS a perfect square. – fleablood Nov 23 '16 at 23:48
  • And n=2 is 4444+2x88+4=4444+176+4=4524=4x1156 is a perfect square. This is a duplicate http://math.stackexchange.com/questions/156462/prove-that-16-1156-111556-11115556-1111155556-are-squares – fleablood Nov 23 '16 at 23:52

2 Answers2

1

Write $10^n=x$. Now you have

$$4\left(\frac{x^2-1}{9}+\frac{4x-4}{9}+\frac{9}{9}\right)=$$ $$4\frac19\left(x^2-1+4x-4+9\right)=\frac{4}{9}(x+2)^2=\left(\frac{2(x+2)}{3}\right)^2$$ So it's always a perfect square.

orion
  • 15,781
1

A slight twist on Orion's answer.

Let $x=11\cdots11$ with $n$ digits. Then $$\eqalign{ 10^n&=9x+1\cr a&=4x(10^n+1)=4x(9x+2)\cr b&=8x\cr a+2b+4&=36x^2+24x+4\cr &=(6x+2)^2\cr &=66\cdots668^2\ ,\cr}$$ where $6$ occurs $n-1$ times.

David
  • 82,662