From Charles Trigg's "Mathematical Quickies: 270 Stimulating Problems with Solutions":

In what system(s) of numeration is 11111 a perfect square?

I have found one base that works: 3. I am not sure whether this is the only solution or not. So far, I have shown that for any solution, the base is not one less than a prime.

Let $S = \{ n^2 | n \in Z^+\}$ be the set of all positive perfect squares.

Let $y$ be the number written as $11111$ in some base, $x$.

For base 2, $y = \dfrac{2^5-1}{2-1} = 31 \notin S$

For base 3, $y = \dfrac{3^5-1}{3-1} = \dfrac{243-1}{2} = 11^2 \in S$

Assume a base $x|x\ge2,x\in\mathbb{Z^+}$.

Write $$y=1+x+x^2+x^3+x^4=n^2 \tag{1}$$

Rearrange (1) to $$\begin{align} 1+x+x^3+x^4&=n^2-x^2\\ (1+x)(1+x^3)&=(n+x)(n-x)\\ (1+x)^2(1-x+x^2)&=(n+x)(n-x) \tag{2} \end{align}$$

We can show $(1+x)^2\nmid(n+x)\text{ and }(1+x)^2\nmid(n-x)$ as follows:

$$\begin{align} (1+x)^2\mid(n+x) &\implies n+x \ge x^2+2x+1 \\ &\implies n-x \ge x^2+1 \\ &\implies (n+x)(n-x) \ge (x^2+2x+1)(x^2+1) \\ &\implies n^2 - x^2 \ge x^4+2x^3+2x^2+2x+1 \\ &\implies n^2 - x^2 > x^4+x^3+x^2+x+1 \end{align}$$ which contradicts (2). Similarly, $(1+x)^2\mid(n-x)$ contradicts (2).

So $\boxed{(1+x)^2\nmid(n+x)}$ and $\boxed{(1+x)^2\nmid(n-x)}$

Assume then that $1+x$ divides both $n+x$ and $n-x$. If so:

$$(1+x)\mid 2x \implies x=1$$ which is disallowed.

So the assumption was false, and $\boxed{(1+x)\nmid(n+x)\text{ or }(1+x)\nmid(n-x)}$.

Therefore, $\boxed{(x+1)\text{ is not prime}}$.

Now let $p$ be a prime factor of $1+x$. Then:

  • $p\nmid x$
  • $p\mid\big((x^2+x)-2(x+1)\big) \implies p\mid(x^2-x-2) \implies p=3 \lor p\nmid(x^2-x+1)$

If $p\mid n+x$ and $p\mid n-x$, we have $p\mid2x \implies p=2\quad(\text{since }p\nmid x)$

Since $(1+x)^2\mid\big((n+x)(n-x)\big)$, if any prime $p_o>2$ divides $1+x$, then ${p_o}^2$ divides either $n+x$ or $n-x$, and $p_o$ does not divide the other.

  • 5,535
  • 3
  • 21
  • 32

1 Answers1


Let the base be $b$. Since

$$b^4 < b^4 + b^3 + b^2 + b + 1 < (b^2 + b)^2,$$

if it is a square, the square root must be $b^2 + c$ with $0 < c < b$. But

$$(b^2 + c)^2 = b^4 + 2c b^2 + c^2.$$

Since $c^2 < b^2$, it follows that we must have

$$2c = b+1 = c^2,$$

whence $c = 2$ and $b = 3$.

Daniel Fischer
  • 199,211
  • 18
  • 249
  • 374