## Non-decimal square

What are the possible positive integer values for the base of a numeral system in which 11111 is a perfect square?

[SOLVED]

#### Ed Murphy solved this puzzle:

Let $$f(b) = 11111_b = b^4 + b^3 + b^2 + b + 1$$.

For even $$b$$,

\begin{align*} \left(b^2 + \frac{b}{2} \right)^2 & = b^4 + b^3 + \frac{b^2}{4}, \\ \left(b^2 + \frac{b}{2} + 1 \right)^2 & = b^4 + b^3 + \frac{9b^2}{4} + b + 1. \end{align*}

$$f(b)$$ is between these two consecutive perfect squares, so it can't be a square.

For odd $$b$$, let $$b = 2x + 1$$, then

\begin{align*} f(b) = 16x^4 + 40x^3 + 40x^2 + 20x + 5, \\ (4x^2 + 5x + 1)^2 = 16x^4 + 40x^3 + 33x^2 + 10x + 1, \\ (4x^2 + 5x + 2)^2 = 16x^4 + 40x^3 + 41x^2 + 20x + 4. \end{align*}

$$f(b)$$ is always larger than the first, and always smaller than the second except for $$x = 1$$ in which case it is equal to the second.

Thus, $$b = 3$$ is the only solution.

#### Susam Pal from cotpi added:

Theorem. For a positive integer $$n$$, $$\sum_{k=0}^4 n^k$$ is a perfect square if and only if $$n = 3$$.

Proof. For any positive integer $$n$$,

\begin{align} & 4n^4 + 4n^3 + n^2 \lt 4(n^4 + n^3 + n^2 + n + 1) \notag \\ & \Rightarrow (2n^2 + 2) \lt 4(n^4 + n^3 + n^2 + n + 1) \label{part1} \end{align}

For any positive integer $$n \gt 3$$,

\begin{align} & (n + 1)(n - 3) \gt 0 \notag \\ & \Rightarrow n^2 - 2n - 3 \gt 0 \notag \\ & \Rightarrow (2n^2 + n + 1)^2 \gt 4(n^4 + n^3 + n^2 + n + 1) \label{part2} \end{align}

From \eqref{part1} and \eqref{part2}, for any positive integer $$n \gt 3$$,

\begin{align} (2n^2 + 2)^2 \lt 4(n^4 + n^3 + n^2 + n + 1) \lt (2n^2 + n + 1)^2 \end{align}

Hence, for any integer $$n \gt 3$$, $$4(n^4 + n^3 + n^2 + n + 1)$$ is between two consecutive perfect squares and therefore, it cannot itself be a perfect square. This implies that $$n^4 + n^3 + n^2 + n + 1$$ can not be a perfect square for any integer $$n \gt 3$$. For $$n \in \{1, 2, 3\}$$, we can verify that $$n^4 + n^3 + n^2 + n + 1$$ is a perfect square if and only if $$n = 3$$.

### Credit

This puzzle is taken from folklore.