# Can $\overline{f(x)g(x)}$ be a perfect square?

Let $f(x) = x^2+1$ and $g(x) = 2x^2$ where $x$ is a positive integer. Does there exist an $x$ such that $$\overline{f(x)g(x)}$$ is a perfect square? Note: $\overline{f(x)g(x)}$ means the number formed by attaching the values of $f(x)$ and $g(x)$. For example, since $f(2) = 5$ and $g(2) = 8$, we have $\overline{f(2)g(2)} = 58$.

The first few numbers for $x$ are $22,58,1018,1732$ and none of these are perfect squares. Taking the number modulo $9$, we find $\overline{f(x)g(x)} \equiv 3x^2+1 \pmod{9}$, but I didn't see a contradiction since it can be a quadratic residue. How can we show the number is never a perfect square?

• What do you mean by $\overline{f(x)g(x)}$? – Arthur Apr 9 '17 at 22:50
• @Arthur I mean like the number formed by attaching the two numbers. For example, since $f(2) = 5$ and $g(2) = 8$, we have $\overline{f(2)g(2)} = 58$. – user19405892 Apr 9 '17 at 22:51
• In other words $(10^k+2)x^2 + 10^k ; k =[2 \log 2+ 2\log (x)]$ is beret square. – fleablood Apr 9 '17 at 23:07

Consider the last digit of $2x^2$ depending on the last nonzero digit of $x$ and you'll discover that $2x^2$ can never be the tail of a square, because it will end in $20\dots0$ or $80\dots0$ or $500\dots0$ where $0\dots0$ means an even number of zeros (possibly none).