×

# Perfect squares in base 9?

Find all perfect squares which have a base 9 representation consisting solely of 1's. Give proof.

Note by Sharky Kesa
1 year, 7 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

Let the perfect squares we're looking for have solely $$n$$ 1's in their base 9 representation. Then, our work amounts to solving the following diophantine equation:

$\sum_{k=0}^{n-1} 9^k = x^2\implies\frac{9^n-1}{9-1}=x^2\implies 9^n-1=8x^2\qquad\qquad (\ast)$

We note the trivial solutions $$n=0,1$$ corresponding to $$x=0,1$$ and show that there are no integer solutions for $$n,x$$ when $$n\gt 1$$.

When $$n\gt 1$$, WLOG, we can assume that $$x$$ is positive. Now,

\begin{align}9^n-1=8x^2&\implies 9^n-9=8x^2-8\\&\implies 8\times 9^{n-1}=8(x^2-1)\\&\implies 9^{n-1}=x^2-1\implies (x-1)(x+1)=3^{2n-2}\end{align}

Now, note that only one of $$x-1$$ and $$x+1$$ is divisible by $$3$$ since otherwise $$3$$ divides their difference $$(x+1)-(x-1)=2$$ which is obviously false. Hence, one of the two terms must equal to $$3^{2n-2}$$ while the latter term equals to $$1$$. So, we have either $$x=3^{2n-2}+1=0$$ or $$x=3^{2n-2}-1=2$$

The first case gives $$3^{2n-2}=-1$$ which obviously doesn't have any integer solutions for $$n$$ and the second case gives $$3^{2n-2}=3\implies 2n-2=1\implies n=3/2$$ which is not an integer.

Hence, when $$n\gt 1$$, there are no integer solutions to equation $$(\ast)$$.

Along with the trivial solutions noted at the beginning, we conclude that the only solutions are $$n=0,1$$ with the perfect squares being $$0,1$$ respectively.

- 1 year, 2 months ago

Technically, 0 in base 9 is 0, which has a '0' digit but no '1' digit in base 9, so only 1 satisfies.

- 1 year, 2 months ago